You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
linux, Linux version 6.19.8-200.fc43.x86_64 (mockbuild@18ffb6c38e5a42008437d0b88e2dfd4e) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.45.1-4.fc43) #1 SMP PREEMPT_DYNAMIC Fri Mar 13 22:06:06 UTC 2026
modulemainstructMyStruct[T] {
pub:
val T
others []T
my_func fn(a T, b T) bool @[required]
}
pub fn (s &MyStruct[T]) run() {
for c in s.others {
if s.my_func(s.val, c) {
println(c.name)
}
}
}
What did you see?
================== C compilation error (from tcc): ==============
cc: /tmp/v_1000/my_struct_test.01KM8ZZXG1BHZX77392DZNG6D0.tmp.c:8541: error: cannot convert 'void *' to 'struct main__MyInt'
=================================================================
Try passing `-g` when compiling, to see a .v file:line information, that correlates more with the C error.
(Alternatively, pass `-show-c-output`, to print the full C error message).
builder error:
==================
C error found while compiling generated C code.
This can be caused by invalid C interop code, C compiler flags, or a V compiler bug.
If your code is pure V and this still happens, 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 .
What did you expect to see?
A successful compilation
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.
V version: V 0.5.1 d261348, press to see full `v doctor` output
What did you do?
./v -g -o vdbg cmd/v && ./vdbg my_struct_test.v && my_struct_testWith the generic struct in
my_struct.v:What did you see?
What did you expect to see?
A successful compilation
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.