shithub: mc

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