shithub: mc

ref: 8e46913c52cec95c1266ce8ee5ee2794eafc9364
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
}