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 e5ae7cd8268d4410f31266ef6bce8c811bb80c3c..0c3eb3f8d260353390f626b0ad70ea491ba750f1 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 |
@@ -660,7 +660,7 @@ abstract class TypeInferrerImpl extends TypeInferrer { |
} |
DartType inferLocalFunction(FunctionNode function, DartType typeContext, |
- bool typeNeeded, int fileOffset, DartType returnContext, bool isNamed) { |
+ bool typeNeeded, int fileOffset, DartType returnContext) { |
bool hasImplicitReturnType = returnContext == null; |
if (!isTopLevel) { |
for (var parameter in function.positionalParameters) { |
@@ -758,8 +758,7 @@ abstract class TypeInferrerImpl extends TypeInferrer { |
// Apply type inference to `B` in return context `N’`, with any references |
// to `xi` in `B` having type `Pi`. This produces `B’`. |
bool isExpressionFunction = function.body is ReturnStatement; |
- bool needToSetReturnType = hasImplicitReturnType && |
- ((isExpressionFunction && !isNamed) || strongMode); |
+ bool needToSetReturnType = hasImplicitReturnType && strongMode; |
ClosureContext oldClosureContext = this.closureContext; |
ClosureContext closureContext = |
new ClosureContext(this, function.asyncMarker, returnContext); |