Allow mixins to be used with const constructors #18707
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
closed-duplicate
Closed in favor of an existing report
A mixin cannot explicitly declare any constructors. However, it does implicitly declare a constructor that is called by classes that include the mixin. Since this constructor is not const, this means that mixins can't ever be used by classes with const constructors.
One possible solution to this would be to have the implicit mixin constructor be const for mixins with no instance variables.
The text was updated successfully, but these errors were encountered: