shithub: mc

ref: 3d20a6d5e0c554e9f3d0d3f504f4dfb28901ebb7
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:	-> 1;;
	`Bar x:	-> x;;
	;;
	-> 2
}