Skip to content

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

Closed

Description

@nshahan

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

Activity

  1. added this to the v3.50.0 milestone on Sep 15, 2022
  2. added
    in editorRelates to code editing or language features
    in lsp/analysis serverSomething to be fixed in the Dart analysis server
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Sep 15, 2022
  3. DanTup commented on Sep 16, 2022

    @DanTup
    Member

    😬

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

  4. DanTup commented on Sep 16, 2022

    @DanTup
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions