summaryrefslogtreecommitdiff
path: root/test/neststruct.myr
blob: 1c5aefe5b84878a37bc4d28d5c6149e0801d0be6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
type s1 = struct
	x : s2
;;

type s2 = struct
	a : int
	b : int
;;

const main = {
	var s1 : s1
	var s2 : s2

	s1.x.a = 1
	s1.x.b = 2
	s2 = s1.x

	-> s2.a + s2.b
}