| Index: pkg/compiler/lib/src/resolution/members.dart
|
| diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
|
| index c41d5a1517f135e38515b03ed4cf5b3bc0ec6af4..460b34ef6da702008b527bc72c89685b85f82ab9 100644
|
| --- a/pkg/compiler/lib/src/resolution/members.dart
|
| +++ b/pkg/compiler/lib/src/resolution/members.dart
|
| @@ -126,7 +126,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
|
| /// When visiting the type declaration of the variable in a [ForIn] loop,
|
| /// the initializer of the variable is implicit and we should not emit an
|
| /// error when verifying that all final variables are initialized.
|
| - bool allowFinalWithoutInitializer = false;
|
| + bool inLoopVariable = false;
|
|
|
| /// The nodes for which variable access and mutation must be registered in
|
| /// order to determine when the static type of variables types is promoted.
|
| @@ -4387,10 +4387,10 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
|
| Scope blockScope) {
|
| LibraryElement library = enclosingElement.library;
|
|
|
| - bool oldAllowFinalWithoutInitializer = allowFinalWithoutInitializer;
|
| - allowFinalWithoutInitializer = true;
|
| + bool oldAllowFinalWithoutInitializer = inLoopVariable;
|
| + inLoopVariable = true;
|
| visitIn(declaration, blockScope);
|
| - allowFinalWithoutInitializer = oldAllowFinalWithoutInitializer;
|
| + inLoopVariable = oldAllowFinalWithoutInitializer;
|
|
|
| Send send = declaration.asSend();
|
| VariableDefinitions variableDefinitions =
|
|
|