| Index: pkg/compiler/lib/src/ssa/codegen.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
|
| index 3e25aa987269621d3f4e8b1336dcfc27303214e4..3fd0bff250aa784ca53599c0e70954cfa0fe6b28 100644
|
| --- a/pkg/compiler/lib/src/ssa/codegen.dart
|
| +++ b/pkg/compiler/lib/src/ssa/codegen.dart
|
| @@ -1598,8 +1598,18 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
|
| // type because our optimizations might end up in a state where the
|
| // invoke dynamic knows more than the receiver.
|
| ClassElement enclosing = node.element.enclosingClass;
|
| - return
|
| - new TypeMask.nonNullExact(enclosing.declaration, compiler.world);
|
| + if (compiler.world.isInstantiated(enclosing)) {
|
| + return new TypeMask.nonNullExact(
|
| + enclosing.declaration, compiler.world);
|
| + } else {
|
| + // The element is mixed in so a non-null subtype mask is the most
|
| + // precise we have.
|
| + assert(invariant(node, compiler.world.isUsedAsMixin(enclosing),
|
| + message: "Element ${node.element} from $enclosing expected "
|
| + "to be mixed in."));
|
| + return new TypeMask.nonNullSubtype(
|
| + enclosing.declaration, compiler.world);
|
| + }
|
| }
|
| // If [JSInvocationMirror._invokeOn] is enabled, and this call
|
| // might hit a `noSuchMethod`, we register an untyped selector.
|
|
|