Skip to content

Constant variables in dartc #3323

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
DartBot opened this issue May 31, 2012 · 6 comments
Closed

Constant variables in dartc #3323

DartBot opened this issue May 31, 2012 · 6 comments
Labels
closed-duplicate Closed in favor of an existing report legacy-area-analyzer Use area-devexp instead.
Milestone

Comments

@DartBot
Copy link

DartBot commented May 31, 2012

This issue was originally filed by [email protected]


Support constant variables in the static analyzer.

@madsager
Copy link
Contributor

Could you please give an example with your expectation and describe what the actual behavior is?


Added Area-Analyzer, NeedsInfo labels.

@DartBot
Copy link
Author

DartBot commented Jun 1, 2012

This comment was originally written by [email protected]


A simple test:

const x = 1;

main() {
  print(x);
}

Dartc should not produce any warnings or errors.
Actual result is three compile errors on the first line:
Unexpected token 'IDENTIFIER' (expected '(')
The token ';' cannot be used as an identifier
The token 'INTEGER_LITERAL' cannot be used as an identifier

It looks like dartc does not support const as a variable modifier.

@lrhn
Copy link
Member

lrhn commented Jun 1, 2012

None of the implementations currently support the new const syntax from spec version 0.7, including the constant variable part.
I.e., it's really a bug against VM, dartc and dart2js.

@danrubel
Copy link

danrubel commented Jun 4, 2012

Added this to the M1 milestone.

@anders-sandholm
Copy link
Contributor

Marked this as being blocked by #3394.

@anders-sandholm
Copy link
Contributor

Added Duplicate label.
Marked as being merged into #3550.

@DartBot DartBot added Type-Defect legacy-area-analyzer Use area-devexp instead. closed-duplicate Closed in favor of an existing report labels Jun 14, 2012
@DartBot DartBot added this to the M1 milestone Jun 14, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report legacy-area-analyzer Use area-devexp instead.
Projects
None yet
Development

No branches or pull requests

5 participants