aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/test2.cff
blob: 66603bad95898088644b51e181e7ebc12e936c7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import "libc.hff";

struct Node<T> {
   link *Node,
   value T,

   fn ok(self Node) void {
   }
}

extern fn main() void {
   let n Node<int> = {#null, 0};
   let n Node<int> = {&n, 1};

   printf("n %d\n", n.value);
   printf("n link %d\n", n.link.value);

   let x Node<f32> = {};
   n->ok();
   x->ok();
}