summaryrefslogtreecommitdiff
path: root/test/nestucon.myr
blob: 1939000b67888cbcbd5c8660bee82e7e221e6ab5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std

type t = struct
	x : union
		`Int int
		`Str byte[:]
	;;
;;

const main = {
	var a : t

	a = [.x = `Str "asdf"]
	match a
	| [.x=`Str s]:	std.put("%s\n", s)
	;;
}