summaryrefslogtreecommitdiff
path: root/test/uconinit.myr
blob: 824879b1542981584cdc27e4e4f14b8c1767cd8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use std

type u = union
	`A
	`B
	`C int
;;

const a = [`A, `B, `C 123]

const main = {
	for v in a
		match v
		| `A:	std.put("A ")
		| `B:	std.put("B ")
		| `C x:	std.put("C %i\n", x)
		;;
	;;
	std.put("\n")
}