Gitly
English
Русский
Español
日本語
中文
Português
Pricing
Log in
Register
vxx
/
vlib
/
v
/
tests
/
interfaces
/
interface_smartcast_call_test.v
12
lines
·
9
sloc
·
129 bytes
·
a6af3d514b07b08e14562fca3f61f5045ef05567
Raw
1
interface
Foo {}
2
3
fn
(f &Foo) func() {}
4
5
struct
Bar {}
6
7
fn
test_main() {
8
mut
f := Foo(Bar{})
9
if
mut
f is Foo {
10
f.func()
11
}
12
}
13