shithub: mc

ref: e0f3c2226a618f63776061b3629d97c49679702b
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
}