Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
comptime
/
comptime_call_void_test.v
15
lines
·
13
sloc
·
253 bytes
·
3ab660b4c67725135218c6cc25b1a9db21557d3b
Raw
1
struct
Struct {}
2
3
fn
(s Struct) func() {}
4
5
fn
test_main() {
6
$
for
method
in
Struct.methods {
7
println(
'${method.name}: ${method.return_type}'
)
8
$
if
method.return_type == 1 {
9
assert
true
10
}
11
$
if
method.return_type == 11 {
12
assert
false
13
}
14
}
15
}
16