Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
options
/
option_interface_test.v
18
lines
·
15
sloc
·
202 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
interface
TestIntf {
2
test()
3
}
4
5
struct
TestStruct {
6
ti ?TestIntf
7
}
8
9
fn
TestStruct.new() TestStruct {
10
return
TestStruct{
11
ti:
none
12
}
13
}
14
15
fn
test_main() {
16
t := TestStruct.new()
17
assert t.ti ==
none
18
}
19