1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/v/tests/aggregate_is_nodetype_test.v

20 lines
250 B
V

type Abc = bool | int | string
fn test_aggregate_is_nodetype() {
x := Abc('test')
match x {
string, int {
if x is string {
println('it is a string')
assert true
} else {
assert false
}
}
else {
assert false
}
}
}