Closed
Description
With Dart 2.13.0 (build 2.13.0-150.0.dev) the analyzer accepts enum comparison in const expression though enum comparisons are not yet allowed in asserts.
enum E { a, b }
@immutable
class A {
const A([E e = E.b]) : assert(e != E.a); // no diagnostic but there should be an `invalid_constant` error for `e != E.a`
}
void main() {
const A(); // const_evaluation_throws_exception
}
/cc @scheglov @bwilkerson