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

Bad error recovery when declaring method named "with" #40419

Closed
srawlins opened this issue Jan 31, 2020 · 1 comment
Closed

Bad error recovery when declaring method named "with" #40419

srawlins opened this issue Jan 31, 2020 · 1 comment
Assignees
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. front-end-fasta front-end-fasta-recovery

Comments

@srawlins
Copy link
Member

Parse this code:

class C {
  int with() => 7;
}

Apparently with is a reserved keyword across the board. In analyzer, for example, this produces the following errors:

error • Variables must be declared using the keywords 'const', 'final', 'var' or a type name. • a.dart:2:3 • missing_const_final_var_or_type
error • Expected to find ';'. • a.dart:2:3 • expected_token
error • Expected a class member. • a.dart:2:7 • expected_class_member
error • Expected an identifier. • a.dart:2:11 • missing_identifier

@srawlins srawlins added front-end-fasta area-front-end Use area-front-end for front end / CFE / kernel format related issues. front-end-fasta-recovery labels Jan 31, 2020
dart-bot pushed a commit that referenced this issue May 1, 2020
…method/field names

Bug: #40419
Change-Id: Ide0fabc4466714a7f9bb9a4474c80a3dfafde56f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145584
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
@jensjoha
Copy link
Contributor

jensjoha commented May 6, 2020

Fixed with a840da4, 497bdc5 and 5b76fc2.

@jensjoha jensjoha closed this as completed May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. front-end-fasta front-end-fasta-recovery
Projects
None yet
Development

No branches or pull requests

2 participants