-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Incorrect completions after :
in object and record patterns
#51961
Comments
https://dart-review.googlesource.com/c/sdk/+/293901 should help for completion inside object pattern. I think record pattern completion was not yet implemented with enough coverage. |
…d without name, inside ObjectPattern. Bug: #51961 Change-Id: Ibd6f762f4e363f26daaca21515a9c23c748f8cc9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293901 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
https://dart-review.googlesource.com/c/sdk/+/293863 for record the record pattern example. |
Can I close this, or should I move it to stable to track possible further work that might need cherry picks? |
…d without name, inside RecordPattern. Bug: #51961 Change-Id: I33b499829887dc221c2d18fe4586ec08207c026f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293863 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
I was able to finish and land https://dart-review.googlesource.com/c/sdk/+/293863 only today, so for record patterns completion is not fully implemented. We might consider cherry picking this change. Other than that, I don't plan further work here. |
Moving this to the Dart 3 stable milestone for cherry-pick consideration. |
What's the status? Is this fixed and just under CP consideration? |
Yes, it is implemented, but should be CPed. |
…ernField without name, inside RecordPattern. Bug: #51961 Change-Id: I33b499829887dc221c2d18fe4586ec08207c026f Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/293863 Fixes: #52101 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296360 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
CP landed. |
Reproduced in IntelliJ, but since completions are provided by the analysis server, I believe this is an analysis server issue.
Given the following code:
Place the cursor after
:var
on the line marked (1), and request completions.Expected result: the only completions should be the names of getters available on
MyClass
, for examplefoo
.Observed result: top level names are offered as completions (these would be invalid), and
foo
is not.Note that things are worse in a declarartion context. With this code:
if I place the cursor after the
:
on the line marked (1), no completions are offered.Similar problems happen for record patterns. In:
if I place my cursor after the
:
on the line marked (1), or after:var
on the line marked (2), I would expect to be offered justfoo
andbar
as completions, but instead I get top level names.The text was updated successfully, but these errors were encountered: