summaryrefslogtreecommitdiff
path: root/test/overlappingif.myr
blob: 0a2de56e2d6cef048e474970fdbfea58a1815fe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std
/* checks that if multiple if conditions are valid, only the first is
* selected. should exit with 2. */
const main = {
	var v
	var x

	v = 0xff

	if v & 0xff00 != 0
		x = 1
	elif v & 0xfff0 != 0
		x = 2
	elif v & 0xffff != 0
		x = 3
	;;
	std.exit(x)
}