summaryrefslogtreecommitdiff
path: root/test/structarray.myr
blob: f64e38e230eb315ce0380b4f07f6dacb6f284d31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std
/* tests a struct containing an array. exit status should be 42. */
type t = struct
	a : int[42]
;;

const main = {
	var v : t

	v.a[0] = 11
	v.a[1] = 20

	std.exit(2*v.a[0] + v.a[1])
}