Chromium Code Reviews| 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; |
| } |