You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Constant forwarding constructors could be supported #27061
Currently constant forwarding constructors are not supported, which seems like an oversight.
For instance:
class S {
final a, b;
const S({this.a, this.b});
}
class M {}
class C extends S with M {
const C() : super(b: 2, a: 1);
}
main() => const C();
const C() is not allowed since the super constructor (S+M) is not constant. This could be supported if the constness of the S constructor propagated to the forwarding S+M constructor where feasible.
Activity
lrhn commentedon Aug 12, 2016
Duplicate of #9745