Index: pkg/compiler/lib/src/universe/codegen_world_builder.dart |
diff --git a/pkg/compiler/lib/src/universe/codegen_world_builder.dart b/pkg/compiler/lib/src/universe/codegen_world_builder.dart |
index c135e726d8d9370123c8e60255f980831f032c15..d937594b74bf1e0b939c6dea2028c5f591dd876b 100644 |
--- a/pkg/compiler/lib/src/universe/codegen_world_builder.dart |
+++ b/pkg/compiler/lib/src/universe/codegen_world_builder.dart |
@@ -514,7 +514,7 @@ class ElementCodegenWorldBuilderImpl extends CodegenWorldBuilderImpl { |
@override |
void _processInstantiatedClassMember( |
ClassEntity cls, MemberElement member, MemberUsedCallback memberUsed) { |
- assert(invariant(member, member.isDeclaration)); |
+ assert(member.isDeclaration, failedAt(member)); |
if (member.isMalformed) return; |
super._processInstantiatedClassMember(cls, member, memberUsed); |
} |
@@ -522,14 +522,14 @@ class ElementCodegenWorldBuilderImpl extends CodegenWorldBuilderImpl { |
@override |
_MemberUsage _getMemberUsage( |
MemberElement member, MemberUsedCallback memberUsed) { |
- assert(invariant(member, member.isDeclaration)); |
+ assert(member.isDeclaration, failedAt(member)); |
return super._getMemberUsage(member, memberUsed); |
} |
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); |
} |