summaryrefslogtreecommitdiff
path: root/test.toc
blob: 786bd031043cd55521b53c8d0b707e47584b17bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Point ::= struct {
	  x, y : int;
};

p :: fn(Point) int = #foreign "p", "./test.so";

mkpoint ::= fn(x:int,y:int) p : Point {
		p.x = x;
		p.y = y;
};

main ::= fn() {
	 point ::= mkpoint(-3,-5);
	 total ::= p(point);
};