The expression in a variable binding is not and must not be seen as
being part of a path expression in which the variable binding appears.
if (body.first && body.first->op == TOP)
top = inst_block(block_take(&body));
- return BLOCK(top, gen_op_simple(DUP), var, bind_matcher(matcher, body));
+ return BLOCK(top, gen_op_simple(DUP), gen_subexp(var), gen_op_simple(POP), bind_matcher(matcher, body));
}
// Like gen_var_binding(), but bind `break`'s wildcard unbound variable
null
true
+# Regression test for #1347
+(.a as $x | .b) = "b"
+{"a":null,"b":null}
+{"a":null,"b":"b"}
+
+