Skip to content

Misleading Enum.values type hint #4877

@incendial

Description

@incendial

Describe the bug
Hovering over the values getter currently shows the enum type, but is actually a list of values.

enum MyEnum {
  first,
  second,
}

void main() {
  print(MyEnum.values);
}
Screenshot 2023-12-04 at 21 18 53


Given how code navigation works I assume it's all by design, but just in case it's not.

Please complete the following information:

Dart Code extension: 3.78.0

App: Visual Studio Code
App Host: desktop
Version: mac 1.84.2

Workspace type: Dart (LSP)

Dart (3.3.0-91.0.dev): /Users/dimannich/Desktop/flutter/bin/cache/dart-sdk
Flutter (3.17.0-0.0.pre): /Users/dimannich/Desktop/flutter (No device)

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