mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 01:02:38 +00:00
Use analyzeExpression
for recusion in ResolverVisitor.visitAugmentedInvocation
.
This change restores the property that the only caller to `ExpressionImpl.resolveExpression` is `ResolverVisitor.dispatchExpression`. This is a useful property because it means that if there's special logic related to type contexts that we want to be executed every time the resolver recurses into an expression, we can safely put that logic in `ResolverVisitor.dispatchExpression`*. (*Exception: sometimes the resolver recurses into expressions using `AstNode.visitChildren`, in which case `ResolverVisitor.dispatchExpression` is bypassed, but fortunately when this happens, the context is guaranteed to be `_`, so most context-related logic is irrelevant.) Change-Id: Ia39c8564014815551266d6b91d0cc102b5768ba8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371181 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
parent
c47df4ce20
commit
40661a5876
|
@ -1943,7 +1943,8 @@ class ResolverVisitor extends ThrowingAstVisitor<void>
|
|||
|
||||
void resolveArgumentsOfInvalid() {
|
||||
for (var argument in node.arguments.arguments) {
|
||||
argument.resolveExpression(this, InvalidTypeImpl.instance);
|
||||
analyzeExpression(argument, InvalidTypeImpl.instance);
|
||||
popRewrite();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue