summaryrefslogtreecommitdiff
path: root/test/structasn.myr
blob: 1c2359238634a2de5ace4bf0cef0b0677039c347 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std
/* tests block assignment of structs. exits with 42.*/
type pair = struct
	a : int
	b : int
;;

const main = {
	var x : pair
	var y : pair
	x.a = 12
	x.b = 30
	y = x
	std.exit(y.a + y.b)
}