}, AST_IterationStatement);
var AST_ForEnumeration = DEFNODE("ForEnumeration", "init object", {
- $documentation: "Base class for enumeration loops, i.e. `for ... in`, `for ... of` & `for await ... of`",
+ $documentation: "Base class for enumeration loops, i.e. `for ... in`, `for ... of` & `for await ... of`",
$propdoc: {
init: "[AST_Node] the assignment target during iteration",
object: "[AST_Node] the object to iterate over"
if (parent instanceof AST_DefaultValue) return parent.name === node && node;
if (parent instanceof AST_Destructured) return node;
if (parent instanceof AST_DestructuredKeyVal) return node;
+ if (parent instanceof AST_ForEnumeration) return parent.init === node && node;
if (parent instanceof AST_Unary) return unary_side_effects[parent.operator] && parent.expression;
}
}
expect_stdout: "PASS"
}
+
+issue_4696: {
+ options = {
+ arguments: true,
+ keep_fargs: false,
+ }
+ input: {
+ console.log(function() {
+ for (arguments in [ 42 ]);
+ for (var a in arguments[0])
+ return "PASS";
+ }());
+ }
+ expect: {
+ console.log(function() {
+ for (arguments in [ 42 ]);
+ for (var a in arguments[0])
+ return "PASS";
+ }());
+ }
+ expect_stdout: "PASS"
+}