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

Unified Diff: pkg/compiler/lib/src/serialization/modelz.dart

Issue 2898403002: Use failedAt in more places (Closed)
Patch Set: merge; address comments 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/serialization/modelz.dart
diff --git a/pkg/compiler/lib/src/serialization/modelz.dart b/pkg/compiler/lib/src/serialization/modelz.dart
index d06500ddf97e75e69d349ba4aecae63a244ea6b0..13d4ba6707fe13404a90a67e971c40c3e2586f1f 100644
--- a/pkg/compiler/lib/src/serialization/modelz.dart
+++ b/pkg/compiler/lib/src/serialization/modelz.dart
@@ -292,14 +292,14 @@ abstract class AstElementMixinZ implements AstElement, ElementZ {
@override
ResolvedAst get resolvedAst {
- assert(invariant(this, _resolvedAst != null,
- message: "ResolvedAst has not been set for $this."));
+ assert(_resolvedAst != null,
+ failedAt(this, "ResolvedAst has not been set for $this."));
return _resolvedAst;
}
void set resolvedAst(ResolvedAst value) {
- assert(invariant(this, _resolvedAst == null,
- message: "ResolvedAst has already been set for $this."));
+ assert(_resolvedAst == null,
+ failedAt(this, "ResolvedAst has already been set for $this."));
_resolvedAst = value;
}
}
@@ -2035,8 +2035,8 @@ class SyntheticTypeVariableElementZ extends ElementZ
@override
ResolutionTypeVariableType get type {
- assert(invariant(this, _type != null,
- message: "Type variable type has not been set on $this."));
+ assert(_type != null,
+ failedAt(this, "Type variable type has not been set on $this."));
return _type;
}
@@ -2050,8 +2050,8 @@ class SyntheticTypeVariableElementZ extends ElementZ
Element get enclosingClass => typeDeclaration;
ResolutionDartType get bound {
- assert(invariant(this, _bound != null,
- message: "Type variable bound has not been set on $this."));
+ assert(_bound != null,
+ failedAt(this, "Type variable bound has not been set on $this."));
return _bound;
}
« no previous file with comments | « pkg/compiler/lib/src/ordered_typeset.dart ('k') | pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698