| Index: frog/leg/resolver.dart
|
| diff --git a/frog/leg/resolver.dart b/frog/leg/resolver.dart
|
| index 6a8342687b8c928376d1e8912624278d79582889..38e3e0cfe6e62a6365635d93d25f40392d291e42 100644
|
| --- a/frog/leg/resolver.dart
|
| +++ b/frog/leg/resolver.dart
|
| @@ -521,12 +521,12 @@ class FullResolverVisitor extends ResolverVisitor {
|
| visitIn(declaration, scope);
|
| visitIn(node.body, scope);
|
| // TODO(lrn): Also allow a single identifier.
|
| - if (declaration is !VariableDefinitions ||
|
| - !declaration.definitions.nodes.tail.isEmpty()) {
|
| - // The variable declaration is either not a declaration, or it's
|
| - // declaring more than one variable.
|
| - error(node.declaredIdentifier, MessageKind.GENERIC,
|
| - ["Invalid variable declaration in for-in"]);
|
| + if ((declaration is !Send || declaration.selector is !Identifier) &&
|
| + (declaration is !VariableDefinitions ||
|
| + !declaration.definitions.nodes.tail.isEmpty())) {
|
| + // The variable declaration is either not an identifier, not a
|
| + // declaration, or it's declaring more than one variable.
|
| + error(node.declaredIdentifier, MessageKind.INVALID_FOR_IN, []);
|
| }
|
| }
|
|
|
|
|