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

Unified Diff: pkg/compiler/lib/src/inferrer/simple_types_inferrer.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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/universe/selector.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index 4e96cd6adde5b0e5ab729d787e56ce1814334580..3507e5fab3d127fb2dc007ba59d77d26c358cbd0 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -1684,13 +1684,13 @@ class SimpleTypeInferrerVisitor<T>
return handleForeignSend(node, target);
}
Selector selector = elements.getSelector(node);
+ CallStructure callStructure = selector.callStructure;
TypeMask mask = inTreeData.typeOfSend(node);
// In erroneous code the number of arguments in the selector might not
// match the function element.
// TODO(polux): return nonNullEmpty and check it doesn't break anything
- if (!selector.applies(target) ||
- (mask != null &&
- !mask.canHit(target, selector, compiler.closedWorld))) {
Johnni Winther 2016/11/14 12:01:29 The target is statically known so `canHit` doesn't
+ if (target.isMalformed ||
+ !callStructure.signatureApplies(target.functionSignature)) {
return types.dynamicType;
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/universe/selector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698