| Index: pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
|
| index 0539e2cb8b59551f33d2de7b89455121b8ca043b..a2f1cb786f49a993e4fdd8ccefcee47da286a3f5 100644
|
| --- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
|
| +++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
|
| @@ -234,9 +234,13 @@ abstract class TypeInferrerImpl extends TypeInferrer {
|
| } else if (receiverType is DynamicType) {
|
| return _functionReturningDynamic;
|
| } else if (receiverType is FunctionType) {
|
| - // TODO(paulberry): handle the case of invoking .call() or .toString() on
|
| - // a function type.
|
| - return _functionReturningDynamic;
|
| + if (methodName.name == 'call') {
|
| + return receiverType;
|
| + } else {
|
| + // TODO(paulberry): handle the case of invoking .toString() on a
|
| + // function type.
|
| + return _functionReturningDynamic;
|
| + }
|
| } else if (receiverType is TypeParameterType) {
|
| // TODO(paulberry): use the bound
|
| return _functionReturningDynamic;
|
|
|