Index: pkg/analyzer/test/src/task/strong/front_end_inference_test.dart |
diff --git a/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart b/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart |
index 216d1712d9d8d9c6e39238dde1a767cea86f6e4e..9a078bc3ce8f1e8d055307e2c8cd6b3645783017 100644 |
--- a/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart |
+++ b/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart |
@@ -361,6 +361,15 @@ class _InstrumentationVisitor extends RecursiveAstVisitor<Null> { |
@override |
visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { |
super.visitFunctionExpressionInvocation(node); |
+ var receiverType = node.function.staticType; |
+ if (receiverType is InterfaceType) { |
+ // This is a hack since analyzer doesn't record .call targets |
+ var target = receiverType.element.lookUpMethod('call', null) ?? |
+ receiverType.element.lookUpGetter('call', null); |
+ if (target != null) { |
+ _recordTarget(node.argumentList.offset, target); |
+ } |
+ } |
if (node.typeArguments == null) { |
var inferredTypeArguments = _getInferredFunctionTypeArguments( |
node.function.staticType, |