Is your feature request related to a problem? Please describe.
It would be helpful to easily see (and navigate) to inferred types for nested patterns (switch, if-case, destructuring, etc.)
For now it's only possible to navigate to most inner inferred type.
Describe the solution you'd like
Make inlay hints for nested patterns behave like for generics (like #4366)
Describe alternatives you've considered
Not really.
Additional context
Addition to #4624
final class Box<T> {
const Box(this.value);
final T value;
}
void main() {
{
const boxedBox = Box(Box((1,2)));
const boxedList = Box([1,2]);
{ // actual (notice that inner pattern is augmented correctly)
if (boxedBox case Box(value: Box(:final (int, int) value))) {}
if (boxedList case Box(value: List(:final int length)) when length > 0) {}
}
{ // expected
if (boxedBox case Box<Box<(int, int)>>(value: Box<(int, int)>(:final (int, int) value))) {}
if (boxedList case Box<List<int>>(value: List<int>(:final int length)) when length > 0) {}
}
}
}
Is your feature request related to a problem? Please describe.
It would be helpful to easily see (and navigate) to inferred types for nested patterns (switch, if-case, destructuring, etc.)
For now it's only possible to navigate to most inner inferred type.
Describe the solution you'd like
Make inlay hints for nested patterns behave like for generics (like #4366)
Describe alternatives you've considered
Not really.
Additional context
Addition to #4624