Skip to content

Autocomplete suggests private fields from other files that cannot be accessed by the language rules #4772

@incendial

Description

@incendial

Describe the bug
Screenshot 2023-10-05 at 15 37 25

Screenshot 2023-10-05 at 15 40 06

To Reproduce
Steps to reproduce the behavior:

  1. Create 2 classes (each in its own file) with static const fields that have the same name
  2. Start typing the name of this field in one of the files

Workspace Environment

Dart Code extension: 3.74.0

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

Workspace type: Dart (LSP)

Dart (3.2.0-134.1.beta): /Users/dimannich/Desktop/flutter/bin/cache/dart-sdk
Flutter (3.15.0-15.2.pre): /Users/dimannich/Desktop/flutter

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