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

Unified Diff: pkg/compiler/lib/src/ordered_typeset.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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/patch_resolver.dart ('k') | pkg/compiler/lib/src/serialization/modelz.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ordered_typeset.dart
diff --git a/pkg/compiler/lib/src/ordered_typeset.dart b/pkg/compiler/lib/src/ordered_typeset.dart
index 829a2d9a958d54334e950955cd4c348e0ddec5e7..bbc71c9b08bc83d274adbb84a41ed2f017255370 100644
--- a/pkg/compiler/lib/src/ordered_typeset.dart
+++ b/pkg/compiler/lib/src/ordered_typeset.dart
@@ -52,8 +52,11 @@ class OrderedTypeSet {
/// class which this set represents. This is for instance used to create the
/// type set for [ClosureClassElement] which extends [Closure].
OrderedTypeSet extendClass(InterfaceType type) {
- assert(invariant(type.element, types.head.treatAsRaw,
- message: 'Cannot extend generic class ${types.head} using '
+ assert(
+ types.head.treatAsRaw,
+ failedAt(
+ type.element,
+ 'Cannot extend generic class ${types.head} using '
'OrderedTypeSet.extendClass'));
Link<InterfaceType> extendedTypes =
new LinkEntry<InterfaceType>(type, types);
@@ -197,8 +200,11 @@ abstract class OrderedTypeSetBuilderBase implements OrderedTypeSetBuilder {
void _addAllSupertypes(InterfaceType type) {
ClassEntity classElement = type.element;
Link<InterfaceType> supertypes = getOrderedTypeSet(classElement).supertypes;
- assert(invariant(cls, supertypes != null,
- message: "Supertypes not computed on $classElement "
+ assert(
+ supertypes != null,
+ failedAt(
+ cls,
+ "Supertypes not computed on $classElement "
"during resolution of $cls"));
while (!supertypes.isEmpty) {
InterfaceType supertype = supertypes.head;
@@ -235,8 +241,7 @@ abstract class OrderedTypeSetBuilderBase implements OrderedTypeSetBuilder {
'secondType': type
});
} else {
- assert(invariant(cls, false,
- message: 'Invalid ordered typeset for $cls'));
+ assert(false, failedAt(cls, 'Invalid ordered typeset for $cls'));
}
return;
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/patch_resolver.dart ('k') | pkg/compiler/lib/src/serialization/modelz.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698