Index: lib/compiler/implementation/universe.dart |
diff --git a/lib/compiler/implementation/universe.dart b/lib/compiler/implementation/universe.dart |
index a03a61c7295d92f44e19ced9a4a85f67449360d7..a8e16e777c071336873cf11454f44a2edf1d9dea 100644 |
--- a/lib/compiler/implementation/universe.dart |
+++ b/lib/compiler/implementation/universe.dart |
@@ -165,6 +165,14 @@ class Selector implements Hashable { |
bool isUnaryOperator() => isOperator() && argumentCount == 0; |
bool isBinaryOperator() => isOperator() && argumentCount == 1; |
+ /** Check whether this is a call to 'assert' with one positional parameter. */ |
+ bool isAssertSyntax() { |
+ return (isCall() && |
+ name == const SourceString("assert") && |
+ argumentCount == 1 && |
+ namedArgumentCount == 0); |
+ } |
+ |
int hashCode() => argumentCount + 1000 * namedArguments.length; |
int get namedArgumentCount => namedArguments.length; |
int get positionalArgumentCount => argumentCount - namedArgumentCount; |
@@ -299,8 +307,9 @@ class Selector implements Hashable { |
bool operator ==(other) { |
if (other is !Selector) return false; |
- return receiverType === other.receiverType |
- && equalsUntyped(other); |
+ Selector otherSelector = other; |
+ return receiverType === otherSelector.receiverType |
+ && equalsUntyped(otherSelector); |
} |
bool equalsUntyped(Selector other) { |