Open
Description
The code below produce an error in the analyzer and no issues in CFE
class C {
static C one = const C(1); // Note, one is not a constant
static const C two = const C(2);
final int v;
const C(this.v);
}
main() {
const c = 2 > 1 ? C.two : C.one; // Analyzer error. Const variables must be initialized with a constant value.
}
There should be no this error in the analyzer.
cc @eernstg to confirm.