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

Unified Diff: pkg/compiler/lib/src/elements/modelx.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/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 2f40c9213783d019ba5029419a4cf0b194f33eae..30c51e82ccfe6ebdccdb34902c5879c14e8c15cc 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -1570,8 +1570,9 @@ abstract class VariableElementX extends ElementX
definitionCache = initializedIdentifier;
}
}
- invariant(definitions, definitionCache != null,
- message: "Could not find '$name'.");
+ if (definitionCache == null) {
+ failedAt(definitionCache, "Could not find '$name'.");
+ }
definitionsCache = definitions;
}

Powered by Google App Engine
This is Rietveld 408576698