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
children []&IGameObject
add_child(mut o IGameObject)
}
@[heap]
structGameObject implements IGameObject {
mut:
name string
parent ?&IGameObject
children []&IGameObject
}
fn (mut gameobject GameObject) add_child(mut o IGameObject) {
o.parent= gameobject
gameobject.children << o
}
fnmain() {
mutv1:=&GameObject{
name: 'v1'
}
mutv2:=&GameObject{
name: 'v2'
}
v1.add_child(mut v2)
for child in v1.children {
if child.parent !=none {
eprintln('parent: ${child.parent.name}')
}
}
}
What did you see?
================== C compilation error (from tcc): ==============
cc: C:/Users/info/AppData/Local/Temp/v_0/main.01JK329G1WXGW8DEKSJER12Z08.tmp.c:4117: warning: implicit declaration of function 'tcc_backtrace'
cc: C:/Users/info/AppData/Local/Temp/v_0/main.01JK329G1WXGW8DEKSJER12Z08.tmp.c:6898: error: pointer expected
... (the original output was 3 lines long, and was truncated to 2 lines)
=================================================================
(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.9 535b04f, 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.