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 39937fbddbc499d58f78fd55c34e30ac18d4be04..bc959c11af499b8b9abeacfc1c32c8f3fa72002f 100644 |
--- a/pkg/compiler/lib/src/universe/selector.dart |
+++ b/pkg/compiler/lib/src/universe/selector.dart |
@@ -218,12 +218,12 @@ class Selector { |
} |
bool appliesUnnamed(Element element) { |
- assert(sameNameHack(element)); |
+ assert(name == element.name); |
return appliesUntyped(element); |
} |
bool appliesUntyped(Element element) { |
- assert(sameNameHack(element)); |
+ assert(name == element.name); |
if (Elements.isUnresolved(element)) return false; |
if (memberName.isPrivate && memberName.library != element.library) { |
// TODO(johnniwinther): Maybe this should be |
@@ -247,13 +247,8 @@ class Selector { |
return callStructure.signatureApplies(function.functionSignature); |
} |
- bool sameNameHack(Element element) { |
- // TODO(ngeoffray): Remove workaround checks. |
- return element.isConstructor || name == element.name; |
- } |
- |
bool applies(Element element) { |
- if (!sameNameHack(element)) return false; |
+ if (name != element.name) return false; |
return appliesUnnamed(element); |
} |