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
A regression with type alias means they are not generated correctly.
module main type NLRI = []u8 fn make_loopback() []NLRI { raw := [u8(32), 10, 0, 0, 1] mut nlris := []NLRI{cap: 1} nlris << NLRI(raw[0..5]) return nlris } fn main() { r := make_loopback() print(r) // [[], [], [], [], []] // [32, 127, 0, 0, 1] }
It prints the numbers and not the empty list
My code stopped working, and it makes me sad. It breaks my heart. 🤣
Alex said I could beg for help and hope for @felipensp to save the day
git disect helped and found this commit:
at 23:25:11 ❯ git bisect bad 33ff7c136b662a553770dfdd9fbac3d331943767 is the first bad commit commit 33ff7c136b662a553770dfdd9fbac3d331943767 (HEAD) Author: Felipe Pena <[email protected]> Date: Tue Sep 10 11:24:48 2024 -0300 parser, checker: fix array alias (#22175) vlib/v/checker/check_types.v | 15 +++++++++++++++ vlib/v/checker/containers.v | 11 ++++++++++- vlib/v/tests/aliases/array_alias_test.v | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 vlib/v/tests/aliases/array_alias_test.v
V 0.4.8 aa3ab3f
V full version: V 0.4.8 aa3ab3f OS: macos, macOS, 15.0, 24A335 Processor: 10 cpus, 64bit, little endian, Apple M1 Max
getwd: /Users/thomas/Code/github.com/ze-community/ze/main vexe: /Users/thomas/Unix/local/v/master/v vexe mtime: 2024-09-30 22:51:15
vroot: OK, value: /Users/thomas/Unix/local/v/master VMODULES: OK, value: /Users/thomas/Code/github.com/ze-community/ze/main/build/modules VTMP: OK, value: /Users/thomas/Code/github.com/ze-community/ze/main/build/tmp
Git version: git version 2.46.2 Git vroot status: 0.4.8-8-gaa3ab3ff .git/config present: true
CC version: Apple clang version 16.0.0 (clang-1600.0.26.3) thirdparty/tcc status: thirdparty-macos-arm64 713692d4
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:
array alias... yeah aliases are tough
cgen: fix array to alias push operation (fix #22374) (#22375)
ce95787
Successfully merging a pull request may close this issue.
Describe the bug
A regression with type alias means they are not generated correctly.
Reproduction Steps
Expected Behavior
It prints the numbers and not the empty list
Current Behavior
My code stopped working, and it makes me sad. It breaks my heart. 🤣
Possible Solution
Alex said I could beg for help and hope for @felipensp to save the day
Additional Information/Context
git disect helped and found this commit:
V version
V 0.4.8 aa3ab3f
Environment details (OS name and version, etc.)
V full version: V 0.4.8 aa3ab3f
OS: macos, macOS, 15.0, 24A335
Processor: 10 cpus, 64bit, little endian, Apple M1 Max
getwd: /Users/thomas/Code/github.com/ze-community/ze/main
vexe: /Users/thomas/Unix/local/v/master/v
vexe mtime: 2024-09-30 22:51:15
vroot: OK, value: /Users/thomas/Unix/local/v/master
VMODULES: OK, value: /Users/thomas/Code/github.com/ze-community/ze/main/build/modules
VTMP: OK, value: /Users/thomas/Code/github.com/ze-community/ze/main/build/tmp
Git version: git version 2.46.2
Git vroot status: 0.4.8-8-gaa3ab3ff
.git/config present: true
CC version: Apple clang version 16.0.0 (clang-1600.0.26.3)
thirdparty/tcc status: thirdparty-macos-arm64 713692d4
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: