Commit 668cec8
[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- pkg/analyzer/lib/src/dart/resolver
1 file changed
+0
-1
lines changedLines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | 379 | | |
381 | 380 | | |
382 | 381 | | |
| |||
0 commit comments