You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
==================
/tmp/v_501/bug.3024684967219090772.tmp.c:2081:17: error: use of undeclared identifier '_V_closure_ctx'
int _var_114 = _V_closure_ctx->left;
^
/tmp/v_501/bug.3024684967219090772.tmp.c:2082:17: error: use of undeclared identifier '_V_closure_ctx'
int _var_120 = _V_closure_ctx->right;
^
2 errors generated.
...
==================
(Use `v -cg` to print the entire error message)
builder error:
==================
C error. This should never happen.
Possible Solution
You can work around this with a temporary variable:
tmp:= left
left= right
right= left
Additional Information/Context
No response
V version
V 0.4.2 4bc9a8f.48a1d6c
Environment details (OS name and version, etc.)
V full version: V 0.4.2 4bc9a8f.48a1d6c
OS: macos, macOS, 12.6, 21G115
Processor: 10 cpus, 64bit, little endian, Apple M1 Max
getwd: /Users/elliot
vexe: /Users/elliot/Downloads/v-5/v
vexe mtime: 2023-10-21 03:59:08
vroot: OK, value: /Users/elliot/Downloads/v-5
VMODULES: OK, value: /Users/elliot/.vmodules
VTMP: OK, value: /tmp/v_501
Git version: git version 2.37.0 (Apple Git-136)
Git vroot status: weekly.2023.42-19-g48a1d6cc (94 commit(s) behind V master)
.git/config present: true
CC version: Apple clang version 14.0.0 (clang-1400.0.29.102)
thirdparty/tcc status: thirdparty-macos-amd64 46662e20
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered:
Describe the bug
Cannot use
a, b = b, a
in a closure.Reproduction Steps
Expected Behavior
No compiler error.
Current Behavior
Produces a C compiler error:
Possible Solution
You can work around this with a temporary variable:
Additional Information/Context
No response
V version
V 0.4.2 4bc9a8f.48a1d6c
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: