Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1512)

Unified Diff: pkg/compiler/lib/src/constants/constant_constructors.dart

Issue 2900263002: Use failedAt in more places (constants, universe) (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698