v2 / vlib / v / fmt / tests / if_not_in_is_expected.vv
17 lines · 13 sloc · 199 bytes · f44eb88a8d987455e5841a1bf6ffdb558e19995f
Raw
1struct Foo1 {}
2
3struct Foo2 {}
4
5type Foo = Foo1 | Foo2
6
7fn main() {
8 a := [1, 2, 3]
9 if 4 !in a {
10 println('4 not in a')
11 }
12
13 foo := Foo(Foo1{})
14 if foo !is Foo2 {
15 println('foo is not Foo2')
16 }
17}
18