You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[analyzer] Dot shorthands: Refactoring MethodInvocationResolver to handle dot shorthands.
This is the base preliminary work for resolving dot shorthand invocations. I'll be calling `resolveDotShorthand` from the `Resolver` in a future CL.
Dot shorthand invocation resolution is very similar to normal MethodInvocation resolution, with a few exceptions (like no `target` expression), so it made sense to re-use the logic we had in the `MethodInvocationResolver`.
I refactored `_rewriteAsFunctionExpressionInvocation` heavily to support both dot shorthands and method invocations, which involved pulling out all of the members into parameters.
Most `_report<some error>` methods were refactored to support dot shorthands as well. Half of them called `_setInvalidTypeResolution` and that ended up just being invoked at the call site rather than in the report helper itself.
Dot shorthands has a very basic `DotShorthandInvocationInferrer` in this CL. None of the overrides for a `MethodInvocationInferrer` seemed to apply since we don't have a target.
No tests yet. Tests will be added once I make the next CL that calls this `resolveDotShorthand` entry point.
Bug: #59835
Change-Id: I8ebeb772c30c88b85ae68d805e062accb1d6d17d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421560
Commit-Queue: Kallen Tu <[email protected]>
Reviewed-by: Chloe Stefantsova <[email protected]>
0 commit comments