4af0918ca5
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 <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Erik Ernst <eernst@google.com>