-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).Dart language related items (some items might be better tracked at github.com/dart-lang/language).closed-duplicateClosed in favor of an existing reportClosed in favor of an existing reporttype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
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.
Metadata
Metadata
Assignees
Labels
area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).Dart language related items (some items might be better tracked at github.com/dart-lang/language).closed-duplicateClosed in favor of an existing reportClosed in favor of an existing reporttype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug