Skip to content
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

Inlay Hints appear in the wrong place when a method has a dart doc comment. #4160

Closed
nshahan opened this issue Sep 15, 2022 · 2 comments
Closed
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

@nshahan
Copy link

nshahan commented Sep 15, 2022

Describe the bug
Inlay Hints for the return type of a method appear in the wrong place when a method has a dart doc comment. It appears to happen to getters and setters as well if they don't explicitly have their types written in the source code.

To Reproduce
Enable Inlay Hints and look at a method with doc comments where the there is no static type in the source code.

Expected behavior
The Inlay Hint showing the type should always appear after the doc comment and before the method name.

Screenshots
Screen Shot 2022-09-15 at 2 54 40 PM

Please complete the following information:

  • Operating System and version: Mac OS 12.5.1
  • VS Code version: 1.71.2
  • Dart extension version: v3.48.3
  • Dart/Flutter SDK version: 2.19.0-edge.b5fe11142c67ceb7012681f2cea720ec556e2af6
@nshahan nshahan added the is bug label Sep 15, 2022
@DanTup DanTup added this to the v3.50.0 milestone Sep 15, 2022
@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 Sep 15, 2022
@DanTup
Copy link
Member

DanTup commented Sep 16, 2022

😬

Thanks! Got a fix at https://dart-review.googlesource.com/c/sdk/+/259584/. Will keep this open until it lands.

copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Sep 16, 2022
…ith docs/annotations and getter/setters

Fixes Dart-Code/Dart-Code#4160.

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

DanTup commented Sep 16, 2022

Fixed by dart-lang/sdk@c841c33 (ships with an SDK update, not Dart-Code).

@DanTup DanTup closed this as completed Sep 16, 2022
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