| Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| index 2f5602e3715600c7205335fac71e26ea4a1fffda..5b54c63c095337507ff4cfdb7fbafa67bb3885a9 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| @@ -509,12 +509,22 @@ class ResolverTask extends CompilerTask {
|
| error, Diagnostic.ERROR);
|
| }
|
|
|
| + // Check that the mixed in class has Object as its superclass.
|
| ClassElement mixin = mixinApplication.mixin;
|
| if (!mixin.superclass.isObject(compiler)) {
|
| CompilationError error = MessageKind.ILLEGAL_MIXIN_SUPERCLASS.error();
|
| compiler.reportMessage(compiler.spanFromElement(mixin),
|
| error, Diagnostic.ERROR);
|
| }
|
| +
|
| + // Check that the mixed in class doesn't have any constructors.
|
| + mixin.forEachLocalMember((Element member) {
|
| + if (member.isGenerativeConstructor() && !member.isSynthesized) {
|
| + CompilationError error = MessageKind.ILLEGAL_MIXIN_CONSTRUCTOR.error();
|
| + compiler.reportMessage(compiler.spanFromElement(member),
|
| + error, Diagnostic.ERROR);
|
| + }
|
| + });
|
| }
|
|
|
| void checkClassMembers(ClassElement cls) {
|
|
|