Commit 7e09901
[analyzer] Fix unnecessary recursive call to ResolverVisitor.resolveForWrite.
When `ResolverVisitor.resolveForWrite` rewrites the LHS of an
assignment from a prefixed identifier to a property access (which it
only does for record types), it's not necessary to make a recursive
call to `resolveForWrite`, because the target of the property access
has already been resolved. It's only necessary to resolve the property
itself, which can be done by calling
`PropertyElementResolver.resolvePropertyAccess` directly.
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: I41c0aaa75b4e7902d584ce36bd0a87874f0eaf8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400040
Reviewed-by: Brian Wilkerson <[email protected]>
Auto-Submit: Paul Berry <[email protected]>
Commit-Queue: Brian Wilkerson <[email protected]>1 parent 4c3ab23 commit 7e09901
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1482 | 1482 | | |
1483 | 1483 | | |
1484 | 1484 | | |
1485 | | - | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
| 1485 | + | |
| 1486 | + | |
1489 | 1487 | | |
1490 | 1488 | | |
1491 | 1489 | | |
| |||
0 commit comments