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 1293511b19a8f154d576f5671d16478e508c4ee5..8957ac05ead5ba8d16e2cea1c354f43854235e55 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 |
@@ -759,8 +759,10 @@ class KernelForStatement extends ForStatement implements KernelStatement { |
void _inferStatement(KernelTypeInferrer inferrer) { |
inferrer.listener.forStatementEnter(this); |
variables.forEach(inferrer.inferStatement); |
- inferrer.inferExpression( |
- condition, inferrer.coreTypes.boolClass.rawType, false); |
+ if (condition != null) { |
+ inferrer.inferExpression( |
+ condition, inferrer.coreTypes.boolClass.rawType, false); |
+ } |
for (var update in updates) { |
inferrer.inferExpression(update, null, false); |
} |