Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
options
/
option_ptr_iface_test.v
18
lines
·
16
sloc
·
219 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
interface
ITeste {
2
mut
:
3
teste ?&ITeste
4
}
5
6
struct
Teste {
7
pub
mut
:
8
teste ?&ITeste
9
}
10
11
fn
test_main() {
12
mut
t := Teste{}
13
t.teste = &t
14
z := &ITeste(t)
15
dump(z)
16
dump(t)
17
assert voidptr(t.teste?) == voidptr(z.teste?)
18
}
19