Index: pkg/compiler/lib/src/constants/constant_constructors.dart |
diff --git a/pkg/compiler/lib/src/constants/constant_constructors.dart b/pkg/compiler/lib/src/constants/constant_constructors.dart |
index 2f8ad07ff4e4b8c4494ff06624b001cb7398299e..2da30e01bfa931fa6d6e2e531085b02c24a27684 100644 |
--- a/pkg/compiler/lib/src/constants/constant_constructors.dart |
+++ b/pkg/compiler/lib/src/constants/constant_constructors.dart |
@@ -158,13 +158,13 @@ class ConstantConstructorComputer extends SemanticVisitor |
ConstantExpression defaultValue, |
int index, |
_) { |
- assert(invariant(node, defaultValue != null)); |
+ assert(defaultValue != null, failedAt(node)); |
defaultValues[index] = defaultValue; |
} |
visitNamedParameterDeclaration(VariableDefinitions node, Node definition, |
ParameterElement parameter, ConstantExpression defaultValue, _) { |
- assert(invariant(node, defaultValue != null)); |
+ assert(defaultValue != null, failedAt(node)); |
String name = parameter.name; |
defaultValues[name] = defaultValue; |
} |
@@ -181,7 +181,7 @@ class ConstantConstructorComputer extends SemanticVisitor |
ConstantExpression defaultValue, |
int index, |
_) { |
- assert(invariant(node, defaultValue != null)); |
+ assert(defaultValue != null, failedAt(node)); |
defaultValues[index] = defaultValue; |
fieldMap[parameter.fieldElement] = new PositionalArgumentReference(index); |
} |
@@ -192,7 +192,7 @@ class ConstantConstructorComputer extends SemanticVisitor |
InitializingFormalElement parameter, |
ConstantExpression defaultValue, |
_) { |
- assert(invariant(node, defaultValue != null)); |
+ assert(defaultValue != null, failedAt(node)); |
String name = parameter.name; |
defaultValues[name] = defaultValue; |
fieldMap[parameter.fieldElement] = new NamedArgumentReference(name); |