Skip to content

Items missing from code-completion when using the await keyword #32056

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
DanTup opened this issue Feb 6, 2018 · 3 comments
Closed

Items missing from code-completion when using the await keyword #32056

DanTup opened this issue Feb 6, 2018 · 3 comments
Labels
devexp-completion Issues with the analysis server's code completion feature legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DanTup
Copy link
Collaborator

DanTup commented Feb 6, 2018

I was just working on some tests for the vs code validator in flutter doctor and noticed something unexpected with the code completion. The code is part of #14463.

Here's the working/correct code (the validate method returns a Future):

screen shot 2018-02-06 at 08 55 35

I deleted installedWithExtension and invoked code completion, but installedWithExtension wasn't listed in the completion:

screen shot 2018-02-06 at 08 55 46

If I remove the await then it showed as expected:

screen shot 2018-02-06 at 08 55 57

(@bwilkerson lmk if there's value in cc'ing you in cases like this; I don't know how cases are normally triaged and whether this makes it easier/more efficient!)

@bwilkerson
Copy link
Member

I don't know how cases are normally triaged ...

We have a (rotating) person assigned to triage issues by adding an area label, then people in each area that do further triage, such as whether the issue represents a bug, what the priority is, etc.

I usually do the triage for area-analyzer, so it's fairly likely that I'll see a report like this without being cc'd, but it also doesn't hurt anything if I see it before the area is assigned because I can also assign the area (and won't triage it twice).

@bwilkerson bwilkerson added legacy-area-analyzer Use area-devexp instead. devexp-completion Issues with the analysis server's code completion feature P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Feb 6, 2018
@DanTup
Copy link
Collaborator Author

DanTup commented Feb 6, 2018

@bwilkerson I'm not sure I feel any more knowledgeable about whether it's better to notify or not =) So, in the interests of adding to the notifications you probably get tons of, I'll skip notifying you (unless it's something I have a specific question for you) - though lmk if you decide you'd prefer the other.

@bwilkerson
Copy link
Member

Given the code

class C {
  static Future<int> method() async => 0;
}
void f() {
  String s = await C..toString();
}

(which might be too simple to trigger the bug) we now suggest method both with and without the await, so I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-completion Issues with the analysis server's code completion feature legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants