Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Unified Diff: pkg/compiler/lib/src/universe/selector.dart

Issue 2501563002: Remove Selector.sameNameHack (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698