-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.contributions-welcomeContributions welcome to help resolve this (the resolution is expected to be clear from the issue)Contributions welcome to help resolve this (the resolution is expected to be clear from the issue)devexp-uxtype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
Code like this:
class A {}
class B {
A _a;
A get a => _a;
set A(A a) => _a = a;
}gives error:
Error: 'A' isn't a type.
A _a;
which is a little confusing, as the type is clearly defined above. It took me a long while to find out what is the actual issue (I first thought incorrect import / conflicting names imported).
It also causes analyzer to highlight all the places except where the actual problem is:

Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.contributions-welcomeContributions welcome to help resolve this (the resolution is expected to be clear from the issue)Contributions welcome to help resolve this (the resolution is expected to be clear from the issue)devexp-uxtype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug