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

type t(@a) = union
	`Val @a
	`None
;;

const f = {-> t(int)
	-> `None
}

const main = {
	match f()
	| `None:	std.exit(42)
	| _:		std.die("Impossible match failure\n");
	;;
	std.exit(0)
}