Skip to content
New issue

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

invalid output for eprintln( [2][3]int{} ) #18866

Closed
spytheman opened this issue Jul 14, 2023 · 1 comment · Fixed by #18879
Closed

invalid output for eprintln( [2][3]int{} ) #18866

spytheman opened this issue Jul 14, 2023 · 1 comment · Fixed by #18879
Labels
Auto str Method Generation Bugs/feature requests, that are related to the automatic string method generation. Bug This tag is applied to issues which reports bugs. Unit: cgen Bugs/feature requests, that are related to the default C generating backend. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general.

Comments

@spytheman
Copy link
Member

V doctor:

V full version: V 0.4.0 7e067c5.fb11a16
OS: linux, Ubuntu 20.04.6 LTS
Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i3-3225 CPU @ 3.30GHz

getwd: /v/vnew
vexe: /v/vnew/v
vexe mtime: 2023-07-14 14:16:38

vroot: OK, value: /v/vnew
VMODULES: OK, value: /home/delian/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.41.0
Git vroot status: weekly.2023.28-25-gfb11a16a (1 commit(s) behind V master)
.git/config present: true

CC version: cc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3

What did you do?
v -g -o vdbg cmd/v && vdbg d.v

eprintln( [2][3]int{} )

What did you expect to see?

[[0, 0, 0], [0, 0, 0]]

What did you see instead?

[[99323336, 99323348, 0], [0, 0, 0]]
@spytheman spytheman added Bug This tag is applied to issues which reports bugs. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. Unit: cgen Bugs/feature requests, that are related to the default C generating backend. Auto str Method Generation Bugs/feature requests, that are related to the automatic string method generation. labels Jul 14, 2023
@Delta456
Copy link
Member

It prints correctly on the playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto str Method Generation Bugs/feature requests, that are related to the automatic string method generation. Bug This tag is applied to issues which reports bugs. Unit: cgen Bugs/feature requests, that are related to the default C generating backend. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants