shithub: mc

ref: 5927f8f8d3b4ab40d2aacfae4b3cbd593c5e7f01
dir: /test/infer-named.myr/

View raw version
use std

type u = union
	`Foo
	`Bar int
;;

const f = {v : int -> u
	-> `Bar v
}

const main = {
	var v

	v = f(99)
	match v
	| `Foo:		std.exit(1)
	| `Bar x:	std.exit(x)
	;;
	std.exit(2)
}