Index: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
index 002ab8ef25c1dc1a510fddd932d88b92849e3ef6..b710245161a05ca95e924aae65464d626e015126 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
@@ -1034,13 +1034,14 @@ class KernelMapLiteral extends MapLiteral implements KernelExpression { |
/// Shadow object for [MethodInvocation]. |
class KernelMethodInvocation extends MethodInvocation |
implements KernelExpression { |
- KernelMethodInvocation(Expression receiver, Name name, Arguments arguments, |
- [Procedure interfaceTarget]) |
- : super(receiver, name, arguments, interfaceTarget); |
+ /// Indicates whether this method invocation is a call to a `call` method |
+ /// resulting from the invocation of a function expression. |
+ final bool _isImplicitCall; |
- KernelMethodInvocation.byReference(Expression receiver, Name name, |
- Arguments arguments, Reference interfaceTargetReference) |
- : super.byReference(receiver, name, arguments, interfaceTargetReference); |
+ KernelMethodInvocation(Expression receiver, Name name, Arguments arguments, |
+ {bool isImplicitCall: false, Procedure interfaceTarget}) |
+ : _isImplicitCall = isImplicitCall, |
+ super(receiver, name, arguments, interfaceTarget); |
@override |
void _collectDependencies(KernelDependencyCollector collector) { |
@@ -1081,8 +1082,8 @@ class KernelMethodInvocation extends MethodInvocation |
.isOverloadedArithmeticOperator(interfaceMember); |
} |
} |
- var calleeType = |
- inferrer.getCalleeFunctionType(interfaceMember, receiverType, name); |
+ var calleeType = inferrer.getCalleeFunctionType( |
+ interfaceMember, receiverType, name, !_isImplicitCall); |
var inferredType = inferrer.inferInvocation(typeContext, typeNeeded, |
fileOffset, calleeType, calleeType.returnType, arguments, |
isOverloadedArithmeticOperator: isOverloadedArithmeticOperator, |