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 1c5f7821c1dc3fc1e1e7441dd73a1096d68568b2..85d7579254bfdbc65626ec294b95baad64e10c9f 100644 |
--- a/pkg/compiler/lib/src/elements/modelx.dart |
+++ b/pkg/compiler/lib/src/elements/modelx.dart |
@@ -1120,6 +1120,8 @@ class PrefixElementX extends ElementX implements PrefixElement { |
void markAsDeferred(Import deferredImport) { |
_deferredImport = deferredImport; |
} |
+ |
+ String toString() => '$kind($name)'; |
} |
class TypedefElementX extends ElementX |
@@ -1240,8 +1242,12 @@ abstract class ConstantVariableMixin implements VariableElement { |
originVariable.constant = value; |
return null; |
} |
- assert(invariant(this, constantCache == null || constantCache == value, |
- message: "Constant has already been computed for $this.")); |
+ assert(invariant( |
+ this, constantCache == null || constantCache == value, |
+ message: "Constant has already been computed for $this. " |
+ "Existing constant: " |
+ "${constantCache != null ? constantCache.getText() : ''}, " |
+ "New constant: ${value != null ? value.getText() : ''}.")); |
constantCache = value; |
} |
} |