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 84ceb23eefefc33a9a408f54d582d2d890b3f8c9..0e2a3449a75b71259d4f9bd428e5b7c4e939754d 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 |
@@ -736,7 +736,7 @@ class KernelForInStatement extends ForInStatement implements KernelStatement { |
KernelVariableDeclaration variable; |
if (_declaresVariable) { |
variable = this.variable; |
- if (variable._implicitlyTyped) { |
+ if (inferrer.strongMode && variable._implicitlyTyped) { |
typeNeeded = true; |
// TODO(paulberry): In this case, should the context be `Iterable<?>`? |
} else { |