Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Issue 2864853002: Fix constructor invocation type inference. (Closed)

Created:
3 years, 7 months ago by Paul Berry
Modified:
3 years, 7 months ago
Reviewers:
ahe, scheglov
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix constructor invocation type inference. Three problems are fixed: - I forgot to pass the `downwards` flag when doing downwards inference. - I forgot to initialize the `formalTypes` and `actualTypes` arrays. - I wasn't tracking whether constructor type arguments were implicit or explicit, so constructor type inference wasn't actually happening. R=scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/4eee6cb5ea554fe659de79a7883f103e781f2fb2

Patch Set 1 #

Patch Set 2 : Additional fixes and test updates #

Patch Set 3 : Rebase and remove unnecessary changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+393 lines, -51 lines) Patch
M pkg/analysis_server/analysis_server.iml View 1 chunk +0 lines, -1 line 0 comments Download
M pkg/analyzer_plugin/analyzer_plugin.iml View 1 2 chunks +3 lines, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/builder/ast_factory.dart View 2 chunks +8 lines, -0 lines 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/body_builder.dart View 7 chunks +8 lines, -8 lines 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart View 6 chunks +14 lines, -7 lines 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/frontend_accessors.dart View 9 chunks +31 lines, -23 lines 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart View 2 chunks +11 lines, -0 lines 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart View 2 chunks +21 lines, -3 lines 0 comments Download
M pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart View 1 chunk +4 lines, -1 line 0 comments Download
M pkg/front_end/test/fasta/strong.status View 1 5 chunks +0 lines, -7 lines 0 comments Download
A pkg/front_end/testcases/inference/constructors_downwards_with_constraint.dart.strong.expect View 1 1 chunk +22 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.strong.expect View 1 1 chunk +13 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.strong.expect View 1 1 chunk +16 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/downwards_inference_on_generic_constructor_arguments_empty_list.dart.strong.expect View 1 1 chunk +16 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.strong.expect View 1 1 chunk +112 lines, -0 lines 0 comments Download
M pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_5.dart View 1 1 chunk +2 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_5.dart.strong.expect View 1 1 chunk +35 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/instance_creation_downwards.dart View 1 1 chunk +17 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/instance_creation_downwards.dart.direct.expect View 1 1 chunk +17 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/instance_creation_downwards.dart.outline.expect View 1 1 chunk +14 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/instance_creation_downwards.dart.strong.expect View 1 1 chunk +17 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/instantiate_to_bounds_invoke_constructor_no_bound.dart.strong.expect View 1 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
Paul Berry
3 years, 7 months ago (2017-05-08 21:33:27 UTC) #2
scheglov
LGTM
3 years, 7 months ago (2017-05-08 21:38:27 UTC) #3
Paul Berry
3 years, 7 months ago (2017-05-08 21:42:03 UTC) #5
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
4eee6cb5ea554fe659de79a7883f103e781f2fb2 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698