Skip to content

Hovering over a for loop variable does not show its type #4627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
incendial opened this issue Jul 4, 2023 · 5 comments
Closed

Hovering over a for loop variable does not show its type #4627

incendial opened this issue Jul 4, 2023 · 5 comments
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone

Comments

@incendial
Copy link

incendial commented Jul 4, 2023

Describe the bug

Screen.Recording.2023-07-04.at.09.53.36.mov

Please complete the following information:

  • Operating System and version: macOS
  • VS Code version: 1.79.2
  • Dart extension version: 3.66.0
  • Dart/Flutter SDK version: Dart SDK version: 3.1.0-163.1.beta (beta)
@incendial
Copy link
Author

Feels like it's related to #4626

@DanTup DanTup added this to the v3.70.0 milestone Jul 5, 2023
@DanTup DanTup added in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available labels Jul 5, 2023
@DanTup
Copy link
Member

DanTup commented Jul 5, 2023

I suspect same cause, but different code. Opened a fix for this one at https://dart-review.googlesource.com/c/sdk/+/312441

@incendial
Copy link
Author

incendial commented Jul 5, 2023

Ah, these DeclaredIdentifier's ... 🥲
Recently discovered that several rules in DCM were not covering them at all. Honestly, I'm really surprised it's a separate type of node (and not a variable declaration or it's variance).

@DanTup
Copy link
Member

DanTup commented Jul 5, 2023

I don't know all the details, but there seem to be some differences between the classes (for ex. VariableDeclaration has things like an initializer and is documented as always being a child of VariableDeclarationList, so it doesn't have keyword because that's on the list).

I don't know if something changed here recently though, I feel like I've seen a few issues related to this recently (such as the one you linked above - which had a similar fix) - although for loops are definitely not new!

copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Jul 5, 2023
Fixes Dart-Code/Dart-Code#4627

Change-Id: Idcff9a6e87929ef6ceb0cbed5b44a493bb6a8260
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
@DanTup
Copy link
Member

DanTup commented Jul 5, 2023

This is fixed by dart-lang/sdk@28ea45c. It's in the server so will show up in a future SDK release.

@DanTup DanTup closed this as completed Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Projects
None yet
Development

No branches or pull requests

2 participants