Index: pkg/compiler/lib/src/universe/selector.dart |
diff --git a/pkg/compiler/lib/src/universe/selector.dart b/pkg/compiler/lib/src/universe/selector.dart |
index ab0ea4ec14f89c624333ade95b7f4e398789c3b0..196489c6f64dea85dbd2ee9b4dea5c65ddc6022f 100644 |
--- a/pkg/compiler/lib/src/universe/selector.dart |
+++ b/pkg/compiler/lib/src/universe/selector.dart |
@@ -67,30 +67,27 @@ class Selector { |
Selector.internal( |
this.kind, this.memberName, this.callStructure, this.hashCode) { |
- assert(invariant( |
- NO_LOCATION_SPANNABLE, |
+ assert( |
kind == SelectorKind.INDEX || |
(memberName != Names.INDEX_NAME && |
memberName != Names.INDEX_SET_NAME), |
- message: "kind=$kind,memberName=$memberName," |
- "callStructure:$callStructure")); |
- assert(invariant( |
- NO_LOCATION_SPANNABLE, |
+ failedAt(NO_LOCATION_SPANNABLE, |
+ "kind=$kind,memberName=$memberName,callStructure:$callStructure")); |
+ assert( |
kind == SelectorKind.OPERATOR || |
kind == SelectorKind.INDEX || |
!isOperatorName(memberName.text) || |
memberName.text == '??', |
- message: "kind=$kind,memberName=$memberName," |
- "callStructure:$callStructure")); |
- assert(invariant( |
- NO_LOCATION_SPANNABLE, |
+ failedAt(NO_LOCATION_SPANNABLE, |
+ "kind=$kind,memberName=$memberName,callStructure:$callStructure")); |
+ assert( |
kind == SelectorKind.CALL || |
kind == SelectorKind.GETTER || |
kind == SelectorKind.SETTER || |
isOperatorName(memberName.text) || |
memberName.text == '??', |
- message: "kind=$kind,memberName=$memberName," |
- "callStructure:$callStructure")); |
+ failedAt(NO_LOCATION_SPANNABLE, |
+ "kind=$kind,memberName=$memberName,callStructure:$callStructure")); |
} |
// TODO(johnniwinther): Extract caching. |