shithub: mc

ref: 682c4ce6114cb44e2ad95a75269585f6e1da8150
dir: /test/generictype.myr/

View raw version
use std

/* checks that parameterized types work. exits with 0. */
type option(@a) = union
	`Some @a::(tcint,tcnum,tctest)
	`None
;;

const main = {
	var v

	v = `Some 123
	match v
	`None:		-> 1;;
	`Some 123:	-> 0;;
	;;
	-> 60
}