summaryrefslogtreecommitdiff
path: root/test/outparam-sl.myr
blob: c6da11e5c328123bed1cee35a1503baa5637d2f3 (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)
	-> v[0]
}