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
V full version: V 0.4.8 df4c6ac.1fc0531
OS: linux, Debian GNU/Linux 12 (bookworm) (VM)
Processor: 1 cpus, 64bit, little endian, DO-Premium-AMD
getwd: /home/user/github.com/markfirmware/stable
vexe: /home/user/github.com/vlang/v/v
vexe mtime: 2024-11-08 01:57:57
vroot: OK, value: /home/user/github.com/vlang/v
VMODULES: OK, value: /home/user/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.39.5
Git vroot status: weekly.2024.45-29-g1fc05315-dirty
.git/config present: true
CC version: cc (Debian 12.2.0-14) 12.2.0
emcc version: N/A
thirdparty/tcc status: thirdparty-linux-amd64 0134e9b9
What did you do? ./v -g -o vdbg cmd/v && ./vdbg src/embedded.v
structAlpha {
alpha int
}
structBravo {
Alpha
bravo int
}
fn (x Alpha) f1() { println('Alpha in receiver ${x.alpha}') }
fnf2(x Alpha) { println('Alpha in arg 1 ${x.alpha}') }
fnmain() {
b:= Bravo{}
b.f1()
f2(b) // note that b.Alpha will work
}
What did you expect to see?
compile no error
What did you see instead?
src/embedded.v:13:6: error: cannot use `Bravo` as `Alpha` in argument 1 to `f2`
11 | b := Bravo{}
12 | b.f1()
13 | f2(b) // note that b.Alpha will work
| ^
14 | }
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 doctor:
What did you do?
./v -g -o vdbg cmd/v && ./vdbg src/embedded.v
What did you expect to see?
compile no error
What did you see instead?
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.
Huly®: V_0.6-21242
The text was updated successfully, but these errors were encountered: