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

Unified Diff: pkg/compiler/lib/src/deferred_load.dart

Issue 2898403002: Use failedAt in more places (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/deferred_load.dart
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index baeb2aa1a46cc89a5f8df54478a8f4efe1c5bad9..64bc15dca3d5e0f69c7b742357120c6c436190c7 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -406,15 +406,20 @@ class DeferredLoadTask extends CompilerTask {
if (backend.constants.hasConstantValue(expression)) {
ConstantValue value =
backend.constants.getConstantValue(expression);
- assert(invariant(node, value != null,
- message: "Constant expression without value: "
+ assert(
+ value != null,
+ failedAt(
+ node,
+ "Constant expression without value: "
"${expression.toStructuredText()}."));
constants.add(value);
} else {
assert(
- invariant(node, expression.isImplicit || expression.isPotential,
- message: "Unexpected unevaluated constant expression: "
- "${expression.toStructuredText()}."));
+ expression.isImplicit || expression.isPotential,
+ failedAt(
+ node,
+ "Unexpected unevaluated constant expression: "
+ "${expression.toStructuredText()}."));
}
});
}

Powered by Google App Engine
This is Rietveld 408576698