-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-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.
Description
Repro:
class A1 {}
class B1 extends A1 {}
class C1 extends A1 implements B1 {}
class A2 {}
class B2 extends A2 {}
class C2 implements B2 {}The first class hierarchy looks like this:
The second class hierarchy looks like this:
For both cases, C is a subtype of A. But we only display that directly under A (not only as a subtype of B) when we have an explicit extends/implements/with.
This feels a bit inconsistent to me. I'm not necessarily familiar with whether LSP asks for something specific or how other languages do this. But I'll advocate that we make both cases display the same way.
- Either always display all subtypes in a full list
- Or display only the explicit subtypes that are not subtypes of another explicit subtype
I'd personally vote for the second option because it avoids duplicated values (like the second screenshot). Not necessarily related, but it would go nicely with #61574, where we ask for exhaustiveness to do the same.
Metadata
Metadata
Assignees
Labels
area-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.