| 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 3a1e981f5b85a870f330bb945e24f3e01b9ed29d..3c2fceef7e2276f3f67482a4b37eda44d41c1e12 100644
|
| --- a/pkg/compiler/lib/src/elements/modelx.dart
|
| +++ b/pkg/compiler/lib/src/elements/modelx.dart
|
| @@ -1408,11 +1408,17 @@ abstract class ConstantVariableMixin implements VariableElement {
|
| originVariable.constant = value;
|
| return;
|
| }
|
| + if (constantCache != null &&
|
| + constantCache.kind == ConstantExpressionKind.ERRONEOUS) {
|
| + // TODO(johnniwinther): Find out why we sometimes compute a non-erroneous
|
| + // constant for a variable already known to be erroneous.
|
| + return;
|
| + }
|
| assert(invariant(this, constantCache == null || constantCache == value,
|
| message: "Constant has already been computed for $this. "
|
| "Existing constant: "
|
| - "${constantCache != null ? constantCache.toDartText() : ''}, "
|
| - "New constant: ${value != null ? value.toDartText() : ''}."));
|
| + "${constantCache != null ? constantCache.toStructuredText() : ''}, "
|
| + "New constant: ${value != null ? value.toStructuredText() : ''}."));
|
| constantCache = value;
|
| }
|
| }
|
|
|