shithub: mc

ref: 682c4ce6114cb44e2ad95a75269585f6e1da8150
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
}