-
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.
Unify named and unnamed argument handling logic for invocations.
In order to support dart-lang/language#731 (improved inference for fold etc.) I'm going to need to add logic to _inferInvocation to postpone type analysis of arguments that are function expressions. To avoid having to code up this logic twice, it will be helpful to have both named and unnamed arguments handled by the same chunk of code. In particular, this change unifies the computation of inferredFormalType, the recursive call to inferExpression, the logic for hoisting, and the update of the local variables identicalInfo, formalTypes, and actualTypes. We pay a small price by having to have multiple `if (isExpression)` checks, but these should be very fast. Change-Id: I095a7eac84237eeb878cc3dd86e76a6a871f31d5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241041 Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
- Loading branch information
1 parent
28654b9
commit e63cea6
Showing
1 changed file
with
56 additions
and
74 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