dart-sdk/pkg/front_end/testcases
Paul Berry c057f091c2 Implement AstBuilder integration for method/function invocations.
This is tricky because there isn't a clean correspondence between
analyzer's AST (which reflects user syntax) and kernel representation.
For example:

  f(args);

could be a call to a static function f, a method f in the current
class, or an invocation of a function-typed object stored in a
variable called f.  ResolutionStorer operates on the kernel
representation, so it sees the difference, but ResolutionApplier
operates on the analyzer AST, so it does not.  So we go to some extra
work to make sure a type is stored for f, regardless of whether f is a
function, method, or a variable.  This requires some re-ordering logic
in ResolutionStorer, since the inferred type of f is not known until
after the args have been visited.

The implementation is not complete; currently the type that we store
in the first two cases is `dynamic` because the type inference
mechanism doesn't preserve enough information to allow us to determine
the correct type; this will be remidied in a future CL.

A similar situation occurs for:

  x.m(args);

which could be a call to a method m in the object x, or an invocation
of a function-typed object returned by the getter m in the object x.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2984013002 .
2017-07-21 10:47:25 -07:00
..
inference Issue 30179. Infer return type of static setters to 'void'. 2017-07-17 16:24:21 -07:00
inference_new Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
rasta Update expectations. 2017-07-17 14:00:17 +02:00
regress Report messages instead of just printing. 2017-07-14 14:07:44 +02:00
shaker VM: Reland Inline instance object hash code into object header on 64bit. 2017-07-03 09:26:46 +02:00
accessors.dart Update expectations files. 2017-06-01 14:01:12 +02:00
accessors.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
accessors.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
argument.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
argument.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
argument.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
argument.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
arithmetic.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
arithmetic.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
arithmetic.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
arithmetic.dart.strong.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
ast_builder.status Implement AstBuilder integration for method/function invocations. 2017-07-21 10:47:25 -07:00
async_function.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
async_function.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
async_function.dart.outline.expect Remove async modifier from outlines 2017-05-18 15:20:20 -07:00
async_function.dart.strong.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
await.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
await.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
await.dart.outline.expect Remove async modifier from outlines 2017-05-18 15:20:20 -07:00
bad_store.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
bad_store.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
bad_store.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
bad_store.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
call.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
call.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
call.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
call.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
cascade.dart Run formatter on a few frontend and kernel files that hadn't been formatted. 2017-04-20 09:25:13 -07:00
cascade.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
cascade.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
casts.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
casts.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
casts.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
classes.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
classes.dart.direct.expect Add type inference for super method invocations. 2017-06-26 12:42:46 -07:00
classes.dart.outline.expect Infer the types of initializing formals from the corresponding fields. 2017-05-25 04:47:44 -07:00
closure.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
closure.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
closure.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
closure.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
compile.status Update expectations. 2017-07-17 14:00:17 +02:00
covariant_generic.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
covariant_generic.dart.direct.expect Use type variables on Typedef correctly. 2017-07-05 13:12:27 +02:00
covariant_generic.dart.outline.expect Use type variables on Typedef correctly. 2017-07-05 13:12:27 +02:00
covariant_generic.dart.strong.expect Revert unrelated expectation changes. 2017-07-17 12:11:05 +02:00
cycles.dart Run formatter on a few frontend and kernel files that hadn't been formatted. 2017-04-20 09:25:13 -07:00
cycles.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
cycles.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
default_values.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
default_values.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
default_values.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
DeltaBlue.dart Dart SDK Spelling b, c, and d. 2017-05-01 08:28:10 +02:00
DeltaBlue.dart.direct.expect Update expectations. 2017-07-17 14:00:17 +02:00
DeltaBlue.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
DeltaBlue.dart.strong.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
escape.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
escape.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
escape.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
escape.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
expressions.dart Run formatter on a few frontend and kernel files that hadn't been formatted. 2017-04-20 09:25:13 -07:00
expressions.dart.direct.expect Implement type inference for try/catch blocks. 2017-06-26 08:57:00 -07:00
expressions.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
external.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
external.dart.direct.expect Update golden files. 2017-06-13 09:25:22 +02:00
external.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
external.dart.strong.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
fallthrough.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
fallthrough.dart.direct.expect Update expectations. 2017-07-17 14:00:17 +02:00
fallthrough.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
fallthrough.dart.strong.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
fibonacci.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
fibonacci.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
fibonacci.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
for_in_scope.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
for_in_scope.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
for_in_scope.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
function_in_field.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
function_in_field.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
function_in_field.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
function_type_is_check.dart Fix crash with generalized function types in type tests. 2017-05-22 14:53:46 +02:00
function_type_is_check.dart.direct.expect Fix crash with generalized function types in type tests. 2017-05-22 14:53:46 +02:00
function_type_is_check.dart.outline.expect Fix crash with generalized function types in type tests. 2017-05-22 14:53:46 +02:00
function_type_is_check.dart.strong.expect Fix crash with generalized function types in type tests. 2017-05-22 14:53:46 +02:00
function_type_recovery.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
function_type_recovery.dart.outline.expect Update expectations files. 2017-06-01 14:01:12 +02:00
functions.dart Run formatter on a few frontend and kernel files that hadn't been formatted. 2017-04-20 09:25:13 -07:00
functions.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
functions.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
hello.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
hello.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
hello.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
implicit_scope_test.dart Introduce initial plumbing for type promotion in fasta. 2017-04-25 09:06:51 -07:00
implicit_scope_test.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
implicit_scope_test.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
implicit_scope_test.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
implicit_this.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
implicit_this.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
implicit_this.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
invocations.dart Run formatter on a few frontend and kernel files that hadn't been formatted. 2017-04-20 09:25:13 -07:00
invocations.dart.direct.expect Update golden files. 2017-06-13 09:25:22 +02:00
invocations.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
language.status Move testing.json and status files to more natural locations. 2017-06-23 14:27:53 +02:00
literals.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
literals.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
literals.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
map.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
map.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
map.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
micro.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
micro.dart.direct.expect Revert unrelated expectation changes. 2017-07-17 12:11:05 +02:00
micro.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
micro.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
mixin.dart Run formatter on a few frontend and kernel files that hadn't been formatted. 2017-04-20 09:25:13 -07:00
mixin.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
mixin.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
named_parameters.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
named_parameters.dart.direct.expect Update expectations. 2017-07-17 14:00:17 +02:00
named_parameters.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
named_parameters.dart.strong.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
null_aware.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
null_aware.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
null_aware.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
null_aware.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
operators.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
operators.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
operators.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
optional.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
optional.dart.direct.expect Revert unrelated expectation changes. 2017-07-17 12:11:05 +02:00
optional.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
optional.dart.strong.expect Revert unrelated expectation changes. 2017-07-17 12:11:05 +02:00
outline.status Add type inference of annotations. 2017-06-28 05:30:23 -07:00
override.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
override.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
override.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
override.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
platform.dart Run formatter on a few frontend and kernel files that hadn't been formatted. 2017-04-20 09:25:13 -07:00
platform.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
platform.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
prefer_baseclass.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
prefer_baseclass.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
prefer_baseclass.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
prefer_baseclass.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
redirecting_constructor.dart Run formatter on a few frontend and kernel files that hadn't been formatted. 2017-04-20 09:25:13 -07:00
redirecting_constructor.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
redirecting_constructor.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
redirecting_factory.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
redirecting_factory.dart.direct.expect Update expectations. 2017-07-17 14:00:17 +02:00
redirecting_factory.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
redirecting_factory.dart.strong.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
shaker.status Move testing.json and status files to more natural locations. 2017-06-23 14:27:53 +02:00
statements.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
statements.dart.direct.expect Update expectations. 2017-07-17 14:00:17 +02:00
statements.dart.outline.expect Remove async modifier from outlines 2017-05-18 15:20:20 -07:00
static_setter.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
static_setter.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
static_setter.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
static_setter.dart.strong.expect Issue 30179. Infer return type of static setters to 'void'. 2017-07-17 16:24:21 -07:00
store_load.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
store_load.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
store_load.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
store_load.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
stringliteral.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
stringliteral.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
stringliteral.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
stringliteral.dart.strong.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
strong.status Improve parsing of function expressions. 2017-07-11 10:35:59 +02:00
super_rasta_copy.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
super_rasta_copy.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
super_rasta_copy.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
super_rasta_copy.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
top_level_accessors.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
top_level_accessors.dart.direct.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
top_level_accessors.dart.outline.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
top_level_accessors_part.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
type_variable_as_super.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
type_variable_as_super.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
type_variable_as_super.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
typedef.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
typedef.dart.direct.expect Store Typedef(s) in kernel when parsing with Fasta, deserilize in DillLibraryBuilder. 2017-05-14 17:51:55 -07:00
typedef.dart.outline.expect Store Typedef(s) in kernel when parsing with Fasta, deserilize in DillLibraryBuilder. 2017-05-14 17:51:55 -07:00
uninitialized_fields.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
uninitialized_fields.dart.direct.expect Update expectations. 2017-07-17 14:00:17 +02:00
uninitialized_fields.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
uninitialized_fields.dart.strong.expect Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
unused_methods.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
unused_methods.dart.direct.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
unused_methods.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
unused_methods.dart.strong.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
void-methods.dart Move kernel baseline tests to front_end. 2017-04-19 10:57:58 +02:00
void-methods.dart.direct.expect Revert unrelated expectation changes. 2017-07-17 12:11:05 +02:00
void-methods.dart.outline.expect Set 'isSyntheticDefault' for default constructors. 2017-07-13 14:06:11 -07:00
void-methods.dart.strong.expect Revert unrelated expectation changes. 2017-07-17 12:11:05 +02:00