-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate type inference logic for invocations.
Moves all of the analyzer's type inference logic for invocations into a single `resolveInvocation` method, defined on an abstract base class `InvocationInferrer`. There are concrete derived classes to specialize this logic for all of the types of AST nodes require this sort of inference (Annotation, ExtensionOverride, FunctionExpressionInvocation, InstanceCreationExpression, MethodInvocation, RedirectingConstructorInvocation, and SuperConstructorInvocation), and the special logic for each node type is slotted into the core algorithm using virtual dispatch. In addition to making the code more maintainable by reducing code duplication, this change paves the way toward modifying the core algorithm to allow inference information to flow between arguments in a generic function call (dart-lang/language#731). Also partially addresses #48500 (Expression.staticParameterElement sometimes points to a synthetic element). Change-Id: I82788d58a62b6555589da16163317b6bbddd53c1 Bug: dart-lang/language#731, #48500 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234864 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Paul Berry <[email protected]>
- Loading branch information
1 parent
6f2291a
commit 1cdfaa8
Showing
14 changed files
with
721 additions
and
909 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.