| 1 | // vtest vflags: -g |
| 2 | struct TaggedSource {} |
| 3 | |
| 4 | type SumType = TaggedSource | int |
| 5 | |
| 6 | fn test_main() { |
| 7 | f() |
| 8 | } |
| 9 | |
| 10 | fn f() { |
| 11 | source := SumType(0) |
| 12 | path := match source { |
| 13 | TaggedSource { |
| 14 | $if foo ? { |
| 15 | 'a' |
| 16 | } $else { |
| 17 | 'b' |
| 18 | } |
| 19 | } |
| 20 | else { |
| 21 | 'c' |
| 22 | } |
| 23 | } |
| 24 | assert path == 'c' |
| 25 | println('done') |
| 26 | } |
| 27 |