Skip to content
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

Poor error recovery when typing an annotation at the end of a class body #42725

Open
bwilkerson opened this issue Jul 16, 2020 · 0 comments
Open
Labels
analyzer-recovery area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P4 type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@bwilkerson
Copy link
Member

Given a file with the following content:

class Foo {
  @Export
}
class Export {
  const Export();
}

the annotation at the end of the class Foo will be discarded when using the analyzer. There isn't currently any place to hang this annotation in the AST, but we need to create one.

I don't know whether the parser will generate the necessary callbacks to capture the information, but if not then it needs to be fixed as well.

This impacts users when attempting to type an annotation before a soon-to-be-added member, and causes code completion to replace the wrong range of characters when it's used.

@bwilkerson bwilkerson added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-recovery labels Jul 16, 2020
@srawlins srawlins added the P4 label Jan 28, 2021
@srawlins srawlins added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-recovery area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P4 type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants