Index: pkg/compiler/lib/src/elements/modelx.dart |
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart |
index 18e76d1314e8ccda1d24427b9e8e7788bb808a31..7ef3d1e36d73166b88b0712e892943fcf592bdc5 100644 |
--- a/pkg/compiler/lib/src/elements/modelx.dart |
+++ b/pkg/compiler/lib/src/elements/modelx.dart |
@@ -2595,7 +2595,8 @@ abstract class BaseClassElementX extends ElementX |
* The returned element may not be resolved yet. |
*/ |
ClassElement get superclass { |
- assert(supertypeLoadState == STATE_DONE); |
+ assert(invariant(this, supertypeLoadState == STATE_DONE, |
+ message: "Superclass has not been computed for $this.")); |
return supertype == null ? null : supertype.element; |
} |