-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Closed
Copy link
Labels
legacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
The Dart 2 specification rolled back the ability to derive a mixin from a class with a superclass other than Object
It did not reintroduce the rule that made it an error to derive a mixin from a class with a super-invocation.
The analyzer rejects mixins derived from classes with super-invocations.
Since those super-invocations are necessarily on members of Object
, there is no need to disallow them.
The front-end does allow super-invocations in mixins derived from objects, for example:
class C {
toString() => "[${super.toString()}]";
}
class D {
toString() => "Yep!";
}
class E = D with C;
main() {
print(E()); // "[Yep!]"
}
This runs in the VM and dart2js, and should be accepted by the analyzer too.
Metadata
Metadata
Assignees
Labels
legacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)