Index: pkg/analysis_server/lib/src/services/correction/fix_internal.dart |
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart |
index edd08626d30abb5d8388b9df6dd21e9e95c91091..e244723c1a039027cdabb9f59670699e5a0a6627 100644 |
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart |
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart |
@@ -576,6 +576,7 @@ class FixProcessor { |
argument = nameNode; |
} |
} |
+ argument = stepUpNamedExpression(argument); |
// should be argument of some invocation |
ParameterElement parameterElement = argument.bestParameterElement; |
if (parameterElement == null) { |
@@ -583,6 +584,10 @@ class FixProcessor { |
} |
// should be parameter of function type |
DartType parameterType = parameterElement.type; |
+ if (parameterType is InterfaceType && parameterType.isDartCoreFunction) { |
+ ExecutableElement element = new MethodElementImpl('', -1); |
+ parameterType = new FunctionTypeImpl.con1(element); |
+ } |
if (parameterType is! FunctionType) { |
return; |
} |