v2 / vlib / v / tests / aliases / alias_to_sum_with_enum_test.v
13 lines · 10 sloc · 143 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1enum Test {
2 abc
3}
4
5type SumTest = Test | u8
6
7type TestAlias = Test
8
9fn test_main() {
10 a := TestAlias.abc
11 b := SumTest(a)
12 assert b is Test
13}
14