Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
options
/
option_heap_var_test.v
21
lines
·
18
sloc
·
210 bytes
·
d23e70f546846c42129f45e8d0febec50e084c2d
Raw
1
@[heap]
2
struct
Foo {
3
a int
4
}
5
6
struct
EdgeService {
7
foo Foo
8
}
9
10
fn
t[S](s S) {
11
}
12
13
fn
test_main() {
14
mut
svc := ?EdgeService(EdgeService{})
15
if
svc !=
none
{
16
t(svc)
17
assert
true
18
}
else
{
19
assert
false
20
}
21
}
22