v2 / vlib / v / tests / options / option_interface_test.v
18 lines · 15 sloc · 202 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1interface TestIntf {
2 test()
3}
4
5struct TestStruct {
6 ti ?TestIntf
7}
8
9fn TestStruct.new() TestStruct {
10 return TestStruct{
11 ti: none
12 }
13}
14
15fn test_main() {
16 t := TestStruct.new()
17 assert t.ti == none
18}
19