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
What did you do? ./v -g -o vdbg cmd/v && ./vdbg main.v && D:\vbug2\main.exe
modulemain
@[heap]
interfaceIGameObject {
mut:
name string
parent ?&IGameObject
next ?&IGameObject
child ?&IGameObject
last_child ?&IGameObject
add_child(mut o IGameObject)
}
@[heap]
structGameObject implements IGameObject {
mut:
name string
parent ?&IGameObject
next ?&IGameObject
child ?&IGameObject
last_child ?&IGameObject
}
fn (mut gameobject GameObject) add_child(mut o IGameObject) {
o.parent= gameobject
if gameobject.last_child !=none {
gameobject.last_child.next= o
} else {
gameobject.child= o
}
gameobject.last_child= o
}
fnmain() {
mutv1:=&GameObject{
name: 'v1'
}
mutv2:=&GameObject{
name: 'v2'
}
v1.add_child(mut v2)
}
What did you see?
================== C compilation error (from tcc): ==============
cc: C:/Users/info/AppData/Local/Temp/v_0/main.01JSE8KMQVRCSRQAW4QH7519FF.tmp.c:3852: warning: implicit declaration of function 'tcc_backtrace'
cc: C:/Users/info/AppData/Local/Temp/v_0/main.01JSE8KMQVRCSRQAW4QH7519FF.tmp.c:5852: error: expected struct or union but not 'struct main__IGameObject *'
...
cc: C:/Users/info/AppData/Local/Temp/v_0/main.01JSE8KMQVRCSRQAW4QH7519FF.tmp.c:5852: error: expected struct or union but not 'struct main__IGameObject *'
(note: the original output was 3 lines long; it was truncated to its first 2 lines + the last line)
=================================================================
(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 .
What did you expect to see?
no c error
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.4.10 b76b1ee, press to see full `v doctor` output
What did you do?
./v -g -o vdbg cmd/v && ./vdbg main.v && D:\vbug2\main.exeWhat did you see?
What did you expect to see?
no c error
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.