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] Report error on the first unresolved identifier
When reporting the "The name 'X' isn't a class." error in instance creation expressions, the mentioned name was the last name even when the previous name was unresolved. This lead to the misleading message the "The name 'named' isn't a class." for `new Class.named()` when `Class` was *not* resolved.
This changes the messaging to handle the case where a prefix of the instance creation is not resolved and report "Undefined name 'X'." in such cases, since we don't know whether 'X' was meant to be a class or just a prefix.
Change-Id: I57ef1dfa229647424855b1f9f8d43e1890094563
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448301
Reviewed-by: Brian Wilkerson <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Johnni Winther <[email protected]>
Reviewed-by: Erik Ernst <[email protected]>
0 commit comments