summaryrefslogtreecommitdiff
path: root/test.toc
blob: b1d5e06da56c9f9d9562094edea42150528f2262 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "std/io.toc", io;


s ::= struct (t :: Type, hasz ::= true) {
	x, y: t;
	#if hasz {
		z: t;
		a :: t = 3 as t;
	}
}

main ::= fn() {
	p: s(float);
	p.x = 7;
	p.y = 13;
	p.z = 12;
	io.puti(p.x as int);
	io.puti(s(int).a as int);
	q: s(int, false);
	q.x = 13;
	io.puti(q.x);
	//io.puti(q.a);
}