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 7e0981b6508dcece0d430fc66957c03ee4d4892d..e183a58f8d771ef3e001edaf4cede251ddc6a2e9 100644 |
--- a/pkg/compiler/lib/src/universe/selector.dart |
+++ b/pkg/compiler/lib/src/universe/selector.dart |
@@ -200,6 +200,9 @@ class Selector { |
bool get isOperator => kind == SelectorKind.OPERATOR; |
bool get isUnaryOperator => isOperator && argumentCount == 0; |
+ /** Check whether this is a call to 'assert'. */ |
+ bool get isAssert => isCall && identical(name, "assert"); |
+ |
/** |
* The member name for invocation mirrors created from this selector. |
*/ |
@@ -252,7 +255,9 @@ class Selector { |
bool sameNameHack(Element element, World world) { |
// TODO(ngeoffray): Remove workaround checks. |
- return element.isConstructor || name == element.name; |
+ return element.isConstructor || |
+ name == element.name || |
+ name == 'assert' && world.isAssertMethod(element); |
} |
bool applies(Element element, World world) { |