dart-sdk/tests/language_2
Sam Rawlins ff2e3c2df0 analyzer: Allow explicit type instantiation of function-typed expressions
This allows local variables and other expressions, as long as the
static type is a generic function type, to be explicitly type
instantiated.

* Expressions with a non-generic function type cannot be type
  instantiated.
* Expressions with a type of `Function` cannot be type instantiated.
* Expressions with other non-function types cannot be type instantiated.

This results in doubling-up of errors in a few situations. I think these
are generally rare occurrences, and tricky to prevent double reporting,
so I've left them for now.

Bug: https://github.com/dart-lang/sdk/issues/46020,
Change-Id: Iad212fd95773f39f3202480b3fa71f6a28c7698f
https://github.com/dart-lang/language/issues/1812
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211941
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-01 00:03:56 +00:00
..
abstract [test] Replace non-implemented @DontInline() annotations 2021-07-26 13:22:31 +00:00
accessor_conflict Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
argument Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
assert Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
assign Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
async Fix message of RETURN_IN_GENERATOR; stop double reporting. 2021-08-24 01:43:48 +00:00
async_nested Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
async_star Fix name of async_star/pause_test2.dart. 2021-05-19 08:04:35 +00:00
await Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
bool Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
call [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
canonicalize Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
cascade Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
class [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
closure [tests] Add regression tests for #46568 2021-07-19 21:49:49 +00:00
compile_time_constant [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
const [cfe] Report all compile-time errors found during constant evaluation 2021-08-24 11:42:53 +00:00
constants_2018 Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
constructor analyzer: Allow explicit type instantiation of function-typed expressions 2021-09-01 00:03:56 +00:00
control_flow_collections Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
covariant Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
covariant_override Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
deferred [cfe] Fix message offset on unresolved prefix access 2021-08-11 16:12:01 +00:00
double Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
double_literals Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
dynamic Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
enum [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
exception Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
export [test] Fix bug in export/duplicate_import_libd 2021-06-30 07:44:52 +00:00
extension_methods [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
factory [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
field Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
final Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
fixed_size_int
function Issue 46062. Report TYPE_ALIAS_CANNOT_REFERENCE_ITSELF on the name of the alias. 2021-05-19 15:45:21 +00:00
function_subtype Rename language(_2)/function_subtype/null.dart to actually be a test. 2021-05-25 11:19:50 +00:00
function_type Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
generic [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
generic_methods [testing] Rely on language versions in the analyzer tests 2021-06-02 07:47:46 +00:00
getter Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
identifier [parser] Consume (and use) identifier looking like start of next top level declaration as class name 2021-06-18 10:20:32 +00:00
identity Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
if Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
if_null [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
implicit_creation Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
implicit_downcast_during Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
import [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
inference Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
initializer_assert
initializing_formal Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
instance [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
instantiate_to_bound
interceptor Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
interface [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
invalid_returns Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
is Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
label [parser] Add beforeSynthetic to SyntheticStringToken 2021-08-30 11:56:30 +00:00
lazy Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
least_upper_bound Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
library Rename library6.dart to make it a test. 2021-05-25 11:55:40 +00:00
list Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
loop Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
main Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
malbounded Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
malformed [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
map [js_runtime] Use custom hashCode for GeneralConstantMap 2021-07-16 22:58:02 +00:00
metadata [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
method [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
mixin [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
mixin_constructor_forwarding Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
mixin_declaration Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
new [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
no_such_method Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
nosuchmethod_forwarding Rename some more incorrectly named tests. 2021-06-03 00:49:54 +00:00
null Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
null_aware [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
number [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
operator Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
optimize [test] Replace non-implemented @DontInline() annotations 2021-07-26 13:22:31 +00:00
override Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
parameter Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
part Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
prefix [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
private [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
propagate Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
redirecting [cfe] Create normal bodies for redirecting factories 2021-08-04 17:51:07 +00:00
reg_exp Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
regress [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
resolution Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
return Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
rewrite Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
script Delete unused files in test folders. 2021-05-19 08:05:05 +00:00
set_literals Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
setter Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
spread_collections Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
stack_trace Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
static [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
string [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
subtyping_dynamic
subtyping_static Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
super Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
superinterface_variance Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
switch Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
symbol Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
sync_star Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
syntax Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
this Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
top_level Delete unused files in test folders. 2021-05-19 08:05:05 +00:00
type Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
type_object Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
type_promotion Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
type_variable [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
typedef Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
unsorted [test] Replace non-implemented @DontInline() annotations 2021-07-26 13:22:31 +00:00
variable [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
vm [vm] Remove --experimental-enable-isolate-groups-jit, only guard via --enable-isolate-groups 2021-07-16 09:13:28 +00:00
void Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
await_type_error_test.dart Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
await_type_test.dart Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
dynamic_type_helper.dart Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
language_2.status [vm/concurrency] Enable more isolate tests, remove outdated TODOs, fix 2 tests 2021-07-16 07:51:58 +00:00
language_2_analyzer.status
language_2_dart2js.status [vm,cfe] Avoid elimination of 'x as Function' type casts 2021-03-31 15:57:29 +00:00
language_2_dartdevc.status
language_2_kernel.status Reland "[vm] Remove --causal-async-stacks flag" 2021-07-02 14:26:46 +00:00
language_2_precompiled.status
language_2_spec_parser.status
language_2_vm.status
library1.dart Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
library2.dart Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
library10.dart Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
library11.dart Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
library12.dart Add language versions to _2 test libraries 2021-04-26 17:58:57 +00:00
static_type_helper.dart Add unawaited function and ignore extensions member. 2021-06-22 20:03:13 +00:00
syntax_helper.dart [testing] Rely on language versions in the analyzer tests 2021-06-02 07:47:46 +00:00