Index: pkg/compiler/lib/src/serialization/serialization_util.dart |
diff --git a/pkg/compiler/lib/src/serialization/serialization_util.dart b/pkg/compiler/lib/src/serialization/serialization_util.dart |
index 24aa6f88ef58e2ba5f9f14109124f5e21d9b1548..1e400000b08f8f9278a96b3fe737606afbc4d5a4 100644 |
--- a/pkg/compiler/lib/src/serialization/serialization_util.dart |
+++ b/pkg/compiler/lib/src/serialization/serialization_util.dart |
@@ -506,10 +506,19 @@ Element deserializeElementReference( |
if (elementName == null) { |
return null; |
} |
- assert(invariant(NO_LOCATION_SPANNABLE, context.isConstructor, |
- message: "Unexpected reference of forwarding constructor " |
- "'${elementName}' from $context.")); |
- ClassElement superclass = context.enclosingClass.superclass; |
+ ClassElement cls; |
+ if (context is ClassElement) { |
+ assert(invariant(NO_LOCATION_SPANNABLE, context.isNamedMixinApplication, |
+ message: "Unexpected reference of forwarding constructor " |
+ "'${elementName}' from $context.")); |
+ cls = context; |
+ } else { |
+ assert(invariant(NO_LOCATION_SPANNABLE, context.isConstructor, |
+ message: "Unexpected reference of forwarding constructor " |
+ "'${elementName}' from $context.")); |
+ cls = context.enclosingClass; |
+ } |
+ ClassElement superclass = cls.superclass; |
element = superclass.lookupConstructor(elementName); |
assert(invariant(NO_LOCATION_SPANNABLE, element != null, |
message: "Unresolved reference of forwarding constructor " |