We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I use array.pop() in the repl, it's not effective except if the result is attributed to a variable.
array.pop()
In the V repl, I get this:
>>> mut values := [1, 2, 3] >>> values.pop() 3 >>> values [1, 2, 3] >>> removed := values.pop() >>> values [1, 2]
In a V application, it's ok:
fn main() { mut values := [1, 2, 3] println('before: ${values}') values.pop() println('after: ${values}') }
v run main.v before: [1, 2, 3] after: [1, 2]
Get the same behavior from code and repl
In the repl, values.pop() is ineffective, removed := values.pop() is ok
values.pop()
removed := values.pop()
No response
0.4.6 c412b9f
V full version: V 0.4.6 c412b9f OS: macos, macOS, 14.5, 23F79 Processor: 12 cpus, 64bit, little endian, Apple M3 Pro
getwd: /Users/davlgd/Documents/code/clever/vTest vexe: /opt/homebrew/Cellar/vlang/0.4.6_1/libexec/v vexe mtime: 2024-05-20 18:06:54
vroot: OK, value: /opt/homebrew/Cellar/vlang/0.4.6_1/libexec VMODULES: OK, value: /Users/davlgd/.vmodules VTMP: OK, value: /tmp/v_501
Git version: git version 2.39.3 (Apple Git-146) Git vroot status: 4.3.7 (58345 commit(s) behind V master) .git/config present: false
CC version: Apple clang version 15.0.0 (clang-1500.3.9.4) thirdparty/tcc: N/A
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:
8188f65
Successfully merging a pull request may close this issue.
Describe the bug
If I use
array.pop()
in the repl, it's not effective except if the result is attributed to a variable.Reproduction Steps
In the V repl, I get this:
In a V application, it's ok:
Expected Behavior
Get the same behavior from code and repl
Current Behavior
In the repl,
values.pop()
is ineffective,removed := values.pop()
is okPossible Solution
No response
Additional Information/Context
No response
V version
0.4.6 c412b9f
Environment details (OS name and version, etc.)
V full version: V 0.4.6 c412b9f
OS: macos, macOS, 14.5, 23F79
Processor: 12 cpus, 64bit, little endian, Apple M3 Pro
getwd: /Users/davlgd/Documents/code/clever/vTest
vexe: /opt/homebrew/Cellar/vlang/0.4.6_1/libexec/v
vexe mtime: 2024-05-20 18:06:54
vroot: OK, value: /opt/homebrew/Cellar/vlang/0.4.6_1/libexec
VMODULES: OK, value: /Users/davlgd/.vmodules
VTMP: OK, value: /tmp/v_501
Git version: git version 2.39.3 (Apple Git-146)
Git vroot status: 4.3.7 (58345 commit(s) behind V master)
.git/config present: false
CC version: Apple clang version 15.0.0 (clang-1500.3.9.4)
thirdparty/tcc: N/A
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: