-
Notifications
You must be signed in to change notification settings - Fork 325
Closed
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris enhancementrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become availableSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone
Description
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) {}
}
}
}
Metadata
Metadata
Assignees
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris enhancementrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become availableSomething that requires changes in the Dart/Flutter SDK to ship before it will become available