summaryrefslogtreecommitdiff
path: root/test/outparam-sl.myr
blob: a1a8eb7a8696ab92a726c7c3f98177e2e224db5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use std
/* should assign a slice through an out param, returning exiting with 2 */
const arr = [1,2,3,4]
const f = {out
	out# = arr[1:3]
}

const main = {
	var v

	f(&v)
	std.exit(v[0])
}