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

Unified Diff: pkg/compiler/lib/src/universe/element_world_builder.dart

Issue 2900263002: Use failedAt in more places (constants, universe) (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/universe/element_world_builder.dart
diff --git a/pkg/compiler/lib/src/universe/element_world_builder.dart b/pkg/compiler/lib/src/universe/element_world_builder.dart
index e6e6a61dadd49ae4e60cbea0ce739aae4787984a..0583059273d872074453c6c60a4a6fc979ea28a6 100644
--- a/pkg/compiler/lib/src/universe/element_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/element_world_builder.dart
@@ -108,8 +108,8 @@ class ElementResolutionWorldBuilder extends ResolutionWorldBuilderBase {
void registerStaticUse(StaticUse staticUse, MemberUsedCallback memberUsed) {
Element element = staticUse.element;
- assert(invariant(element, element.isDeclaration,
- message: "Element ${element} is not the declaration."));
+ assert(element.isDeclaration,
+ failedAt(element, "Element ${element} is not the declaration."));
super.registerStaticUse(staticUse, memberUsed);
}
@@ -134,7 +134,7 @@ class ElementResolutionWorldBuilder extends ResolutionWorldBuilderBase {
void _processInstantiatedClassMember(
ClassEntity cls, MemberElement member, MemberUsedCallback memberUsed) {
- assert(invariant(member, member.isDeclaration));
+ assert(member.isDeclaration, failedAt(member));
member.computeType(_resolution);
super._processInstantiatedClassMember(cls, member, memberUsed);
}

Powered by Google App Engine
This is Rietveld 408576698