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 5eea63328e1fb554cb1da106f990624b210683e0..f62dac93da4edee221530816de912d2ac7f68500 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 |
@@ -2272,8 +2272,7 @@ class KernelYieldStatement extends YieldStatement implements KernelStatement { |
? inferrer.coreTypes.streamClass |
: inferrer.coreTypes.iterableClass); |
} |
- var inferredType = inferrer.inferExpression( |
- expression, typeContext, closureContext != null); |
+ var inferredType = inferrer.inferExpression(expression, typeContext, true); |
closureContext.handleYield(inferrer, isYieldStar, inferredType); |
inferrer.listener.yieldStatementExit(this); |
} |