shithub: mc

ref: 30ae6dbd5eb7c7f8c9c76a32723dd33c5f90978b
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
}