Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
printing
/
print_fn_test.v
15
lines
·
13
sloc
·
162 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
struct
Foo {
2
mut
:
3
f ?
fn
(int)
4
}
5
6
fn
test_print_fn() {
7
a :=
fn
(a string) int {
8
return
1
9
}
10
println(a)
11
12
foo := Foo{}
13
println(foo.f)
14
assert foo.f ==
none
15
}
16