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 5a4cc108d06d9626a42e4e8f401a27d6aec80cd3..a2e1b2ef897114e4eedbf4cd10f1e26882cdd5df 100644 |
--- a/pkg/compiler/lib/src/elements/modelx.dart |
+++ b/pkg/compiler/lib/src/elements/modelx.dart |
@@ -1397,7 +1397,7 @@ abstract class ConstantVariableMixin implements VariableElement { |
ConstantVariableMixin originVariable = origin; |
return originVariable.constant; |
} |
- assert(invariant(this, constantCache != null, |
+ assert(invariant(this, !isConst || constantCache != null, |
message: "Constant has not been computed for $this.")); |
return constantCache; |
} |