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

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

Issue 2904783002: Use failedAt in more places (misc) (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
« no previous file with comments | « pkg/compiler/lib/src/library_loader.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/types/types.dart
diff --git a/pkg/compiler/lib/src/types/types.dart b/pkg/compiler/lib/src/types/types.dart
index 9ce32f6d24c5ff45fb87c489483db174720e5953..5ef999e753a0373d519e1a0404f9845b8622eff5 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -5,7 +5,7 @@
library types;
import '../closure.dart' show SynthesizedCallMethodElementX;
-import '../common.dart' show invariant;
+import '../common.dart' show failedAt;
import '../common/tasks.dart' show CompilerTask;
import '../compiler.dart' show Compiler;
import '../elements/elements.dart';
@@ -210,8 +210,11 @@ class GlobalTypeInferenceResults {
// TODO(sigmund,johnniwinther): compute result objects eagerly and make it an
// error to query for results that don't exist.
GlobalTypeInferenceElementResult _resultOf(AstElement element) {
- assert(invariant(element, !element.isGenerativeConstructorBody,
- message: "unexpected input: ConstructorBodyElements are created"
+ assert(
+ !element.isGenerativeConstructorBody,
+ failedAt(
+ element,
+ "unexpected input: ConstructorBodyElements are created"
" after global type inference, no data is avaiable for them."));
// TODO(sigmund): store closure data directly in the closure element and
« no previous file with comments | « pkg/compiler/lib/src/library_loader.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698