Gitly
English
Русский
Español
日本語
中文
Português
Pricing
Log in
Register
vxx2
/
vlib
/
v
/
checker
/
tests
/
fn_call_arg_fn_mismatch_err.vv
15
lines
·
12
sloc
·
182 bytes
·
1aad481c29b202b3752226af9ce005edc0d8f263
Raw
1
// for issue 19325
2
type Response = int | string
3
4
fn foo() string {
5
return 'hello'
6
}
7
8
fn event(cb fn () Response) {
9
resp := cb()
10
assert resp is string
11
}
12
13
fn main() {
14
event(foo)
15
}
16