Skip to content

Seciont 10.1 compile time constants and evaluation order not specified #228

@DartBot

Description

@DartBot

This issue was originally filed by zundel@google.com


There is no mention in the spec of evaluating final variables in a particular order, so test cases have been added to use final variables in an expression before they are declared. This is turning out to be difficult to implement, so I was looking for a way out in the spec, but didn't find one - drat.

If that is the correct interpretation, the ability to use variables before they are referenced opens up the possibility of circular dependencies between expressions that isn't possible in many other languages. I was thinking that the spec might want to mention that circular definitions in CTConstant expressions are illegal. We certainly want those expressions to be defined explicitly (a compile time error).

Metadata

Metadata

Assignees

Labels

area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions