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

12 lines
144 B
V

struct Moon {}
struct Mars {}
type World = Mars | Moon
fn test_assert_sumtype() {
w := World(Moon{})
assert w is Moon
assert w !is Mars
}