summaryrefslogtreecommitdiff
path: root/test/uconinit.myr
blob: cd7e4a2c8e027487d6504291e033c6f7f8854f9b (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 : a
		match v
		| `A:	std.put("A ")
		| `B:	std.put("B ")
		| `C x:	std.put("C {}\n", x)
		;;
	;;
	std.put("\n")
}