Description
This issue was originally filed by ms...@unipro.ru
What steps will reproduce the problem?
Run the following test:
class C {
static final String s = "One" + "Two";
}
main() {
print(C.s);
}
What is the expected output? What do you see instead?
Expected: compile-time error.
Actual: "OneTwo"
What version of the product are you using? On what operating system?
Dart VM r2810, Ubuntu 10.04
Please provide any additional information below.
According to the section 10.1 of the Language Specification, "An expression of one of the forms e1+e2, e1 - e2, e1 * e2, e1 / e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e1 and e2 are constant expressions that evaluate to a numeric value."
can be a constant expression, but an additive expression with string literals can't.