Skip to content

Commit 668cec8

Browse files
stereotype441Commit Queue
authored andcommitted
[analyzer] avoid doing redundant work when resolving an extension override function reference.
The first thing done by `FunctionReferenceResolver._resolvePropertyAccessFunction` (which is responsible for resolving function references whose "function" part is a property access) is to resolve the target of the property access. If the target is an extension override, it then calls `_resolveExtensionOverride` to finish resolution of the function reference. Therefore, `_resolveExtensionOverride` doesn't need to re-resolve the target; it's already been resolved. This change helps pave the way for a follow-up CL in which I'll be adding assertions that fire if the `ResolverVisitor` tries to resolve a given subexpression multiple times. (Doing so is dangerous because it can interfere with the correctness of flow analysis.) Change-Id: Id2607b0325a78640c054f2978079d1f0afb35e67 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400041 Reviewed-by: Brian Wilkerson <[email protected]> Auto-Submit: Paul Berry <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]>
1 parent 2f5deac commit 668cec8

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

pkg/analyzer/lib/src/dart/resolver/function_reference_resolver.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ class FunctionReferenceResolver {
376376
}
377377

378378
if (member is PropertyAccessorElement) {
379-
function.accept(_resolver);
380379
_resolve(node: node, rawType: member.returnType);
381380
return;
382381
}

0 commit comments

Comments
 (0)