shithub: mc

ref: 797b4ce60e118ccc6b0b38b2d46b6c3acbe50778
dir: /test/matchconst.myr/

View raw version
use std
/* 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 ;;
	;;
}