Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
When compiling the code it outputs a builder error.
Reproduction Steps
struct Parse {
mut:
stack []&Element
}
struct Balise {}
struct RawText {}
type Element = Balise | RawText
fn (mut p Parse) process_open_tag() {
mut last := &p.stack[0]
if mut last is RawText {
}
}
Expected Behavior
No builder error or an error explaining what is wrong.
Current Behavior
❯ v run main.v
==================
/tmp/v_1000/main.01J1506VYF091BH3R85WEJH7MS.tmp.c:13185: error: struct or union expected
...
==================
(Use `v -cg` to print the entire error message)
builder error
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.6 294f7e4.4d2c2da
Environment details (OS name and version, etc.)
OS: linux, Linux version 6.7.11-200.fc39.x86_64 (mockbuild@bdb8d24f206645e2bda44c1cf867612d) (gcc (GCC) 13.2.1 20240316 (Red Hat 13.2.1-7), GNU ld version 2.40-14.fc39) #1 SMP PREEMPT_DYNAMIC Wed Mar 27 16:50:39 UTC 2024
[!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.
Describe the bug
When compiling the code it outputs a builder error.
Reproduction Steps
Expected Behavior
No builder error or an error explaining what is wrong.
Current Behavior
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.6 294f7e4.4d2c2da
Environment details (OS name and version, etc.)
OS: linux, Linux version 6.7.11-200.fc39.x86_64 (mockbuild@bdb8d24f206645e2bda44c1cf867612d) (gcc (GCC) 13.2.1 20240316 (Red Hat 13.2.1-7), GNU ld version 2.40-14.fc39) #1 SMP PREEMPT_DYNAMIC Wed Mar 27 16:50:39 UTC 2024