summaryrefslogtreecommitdiff
path: root/test/matchint.myr
blob: 5fc3eb40ea73480af61f0894bf649847c58e573a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)
	;;
}