v/vlib/v/checker/tests/sumtype_has_no_variant_sugg...

18 lines
262 B
V

import v.checker.tests.amod as x
struct Struct1 {}
struct AnotherStruct {}
struct ThirdStruct {}
type Abc = AnotherStruct | Struct1 | ThirdStruct | x.Bcg | x.Xyz
fn main() {
a := Abc(Struct1{})
match a {
x.NonExisting { println('----') }
else {}
}
}