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

Dart2JS parsing miscategorizes tokens around const loop variable #21167

Closed
eernstg opened this issue Sep 30, 2014 · 1 comment
Closed

Dart2JS parsing miscategorizes tokens around const loop variable #21167

eernstg opened this issue Sep 30, 2014 · 1 comment
Assignees

Comments

@eernstg
Copy link
Member

eernstg commented Sep 30, 2014

Dart2JS fails with the compile-time error 'Error: Unexpected token 'x'' at 'for(const int x..' in the following co19 test:

Language/13_Statements/06_For_A01_t11.

Currently, the code should probably be accepted rather than ending in a compile-time error. Issue #5675 may result in a spec change such that it should be a compile-time error. In any case, the parser currently does not treat the given tokens as <modifier> <type> <identifer>, which means that dart2js should be modified both if the code should be accepted and if it should be rejected.

Presumably, the spec will be adjusted, and this ticket can be updated to "make const loop vars a compile-time error".

@johnniwinther
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants