Allow var bindings in path expressions (#1347)
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.
This commit is contained in:
1 parent
02bad4b298
commit
8cde328007
2 files changed
+7
-1
No files matched your search
+1
-1
@@ -893,7 +893,7 @@ block gen_destructure(block var, block matcher, block body) {
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user