-
Notifications
You must be signed in to change notification settings - Fork 340
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
I've been writing some Rust code and I've appreciated the inline declarations of inferred types. It makes reading and working with code much easier. This is apropos Dart where some repositories enforce the explicit declaration of types whereas others don't.
Here is an example of the Rust extension showing inferred types (and parameter names but this issue isn't asking for that):

: &Option<Rc<Node<i32>>> is the inferred type of result. It doesn't exist in the file but it would be valid code had it been written there. The inline hint is itself valid code, which is important.
So in Dart's case it would look like this:
final x = add(1, 2);becomes:
final int x = add(1, 2);Where int doesn't exist in the code but is displayed as above as if it was.
KiddoV
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