shithub: mc

ref: cf50193c7dc0c13d373d60982e7cb95168e0167e
dir: /test/slice.myr/

View raw version
use std
/* checks that taking slices of arrays works. should exit with 7 */
const main = {
	var a : int[3]
	var s

	s = a[:]
	s[0] = 3
	s[1] = 4
	s[2] = s[0] + s[1] + s.len
	std.exit(s[2])
}