CFE fails to report error for import prefix hidden by class member (when used to name a type) #34498
Labels
area-front-end
Use area-front-end for front end / CFE / kernel format related issues.
front-end-missing-error
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Milestone
Consider the following code:
Based on my reading of the spec, there should be a compile-time error at (1), because the declaration of the getter
core
inside of class A hides the import prefix declared at top level. So the typecore.List
should be invalid.But the front end accepts this code without complaint, and considers the return type of the getter to be the type
List
fromdart:core
.Note that the analyzer's handling of this case isn't correct either; it also accepts the code without complaint, but it consideres the return type of the getter to be
dynamic
.The text was updated successfully, but these errors were encountered: