Skip to content

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

@nshahan

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

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