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

Array of options (like ?u32(none)) #23089

Open
mecolosimo opened this issue Dec 7, 2024 · 0 comments
Open

Array of options (like ?u32(none)) #23089

mecolosimo opened this issue Dec 7, 2024 · 0 comments
Labels
Bug This tag is applied to issues which reports bugs. Status: Confirmed This bug has been confirmed to be valid by a contributor. 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

@mecolosimo
Copy link

mecolosimo commented Dec 7, 2024

V doctor:

V full version: V 0.4.8 2684ef9.e32e9f7
OS: linux, Linux Mint 22
Processor: 8 cpus, 64bit, little endian, AMD Ryzen 5 7520U with Radeon Graphics

getwd: /home/mcolosimo/SyncProjects/mecolosimo/vbug
vexe: /home/mcolosimo/github/v/v
vexe mtime: 2024-12-07 13:47:39

vroot: OK, value: /home/mcolosimo/github/v
VMODULES: OK, value: /home/mcolosimo/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.43.0
Git vroot status: weekly.2024.49-33-ge32e9f70
.git/config present: true

CC version: cc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
emcc version: N/A
thirdparty/tcc status: thirdparty-linux-amd64 0134e9b9

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

module main

fn main() {
	mut a := []?u32{len: 0xFF}
	if c := a[0] {
		println("c:  ${c} not none!")
	}
}

What did you expect to see?

nothing

What did you see instead?

================== C compilation error (from tcc): ==============
cc: /tmp/v_1000/main.01JEGP0P1KZEZ937Y65KAK4J9C.tmp.c:5394: error: '_t2' undeclared
=================================================================
(You can pass `-cg`, or `-show-c-output` as well, to print all the C error messages).
builder error: 
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .

Huly®: V_0.6-21527

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.

@felipensp felipensp added Bug This tag is applied to issues which reports bugs. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: cgen Bugs/feature requests, that are related to the default C generating backend. labels Dec 7, 2024
@spytheman spytheman added the Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs. Status: Confirmed This bug has been confirmed to be valid by a contributor. 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

No branches or pull requests

3 participants