Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
incendial opened this issue Oct 5, 2023 · 4 comments
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone

Comments

@incendial
Copy link

incendial commented Oct 5, 2023

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

@DanTup
Copy link
Member

DanTup commented Oct 8, 2023

I don't seem to be able to repro this - can you provide a code sample that causes it, or some more information about how these items are declared that might help me trigger it? Thanks!

image

@DanTup
Copy link
Member

DanTup commented Oct 8, 2023

nm, I missed the word static 😁

@DanTup DanTup added this to the v3.76.0 milestone Oct 8, 2023
@DanTup DanTup added in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available labels Oct 8, 2023
@DanTup
Copy link
Member

DanTup commented Oct 8, 2023

copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Oct 23, 2023
…side of library

Fixes Dart-Code/Dart-Code#4772

Change-Id: I5a033b7464c2325f4f5db309254392e0ec337d07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329605
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
@DanTup
Copy link
Member

DanTup commented Oct 23, 2023

Fixed via dart-lang/sdk@ae78a3d

The fix is in the Dart analysis server so it'll ship in a future Dart/Flutter SDK (not Dart-Code update).

@DanTup DanTup closed this as completed Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Projects
None yet
Development

No branches or pull requests

2 participants