shithub: mc

ref: ff88594df5c5df6fb8f227ab8e5df3529ba6e72f
dir: /test/matchint.myr/

View raw version
use std
/* checks that matching integers works. exits with 84. */
const main = {
	var v

	v = 12
	match 12
	| 1:	std.exit(42)
	| 2:	std.exit(81)
	| 3:	std.exit(123)
	| 4:	std.exit(99)
	| 12:	std.exit(84)
	| 6:	std.exit(18)
	| x:	std.die("Got an unexpected int!\n")
	;;
}