shithub: mc

ref: 9a8ac636f97d0da01fe0d7283082bc7b9315e44e
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
}