Skip to content

Method calls on unresolved/invalid variables are coloured inconsistently #3412

@ykmnkmi

Description

@ykmnkmi

Describe the bug
Extension method color depends on list type.

To Reproduce

void main() {
  var list = <dynamic>[1, 2, 3];
  list[0].equals(1); // <- blue

  var list2 = <int>[1, 2, 3];
  list2[0].equals(1); // <- yellow
}

extension ExpectExtension on Object? {
  void equals(Object? value) {
    assert(this == value);
  }
}

Expected behavior
Same colors.

Screenshots
image

Versions (please complete the following information):

  • VS Code version: 1.57.0
  • Dart extension version: v3.23.0
  • Dart/Flutter SDK version: 2.14.0-152.0.dev

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 bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions