summaryrefslogtreecommitdiff
path: root/test/matchconst.myr
blob: 150c2d227aac683506f8836692317ae50bee03cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* checks that matching works when comparing against constants,
instead of just literals. exits with 88. */
/* some misc constants */
const Ca = 123
const Cb = 8
const Cc = 42

const main = {
	var v

	v = 8
	match v
	Ca: 	-> 123 ;;
	Cb:	-> 88 ;;
	Cc:	-> 42 ;;
	;;
}