vlang / v

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
MIT License
35.5k stars 2.15k forks source link

builder error: cannot convert 'struct array' to 'struct array *' #21690

Closed Eliyaan closed 1 week ago

Eliyaan commented 1 week ago

Describe the bug

A builder error is found when running the following code.

Reproduction Steps

struct Balise {
}

fn escape_tag(mut parents []Balise) {
                dump(parents)
                stack := []&Balise{}
                dump(stack)
}

Expected Behavior

No builder error.

Current Behavior

==================
/tmp/v_1000/main.01J0K7CCEACS17T5B1Z0DCW7AH.tmp.c:13228: error: cannot convert 'struct array' to 'struct array *'
...
==================
(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.bebe943

Environment details (OS name and version, etc.)

V full version: V 0.4.6 294f7e4.bebe943
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.