shithub: mc

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