diff options
Diffstat (limited to 'bootstrap/test2.cff')
| -rw-r--r-- | bootstrap/test2.cff | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bootstrap/test2.cff b/bootstrap/test2.cff index 3061d6e..e5e484a 100644 --- a/bootstrap/test2.cff +++ b/bootstrap/test2.cff @@ -18,6 +18,12 @@ struct Bit<T> { def Y = 3.3; +enum union Value { + None, + Int i32, + Flo f32, +} + extern fn main() void { let n Node<int> = {#null, 0}; let n Node<int> = {&n, 1}; @@ -25,6 +31,9 @@ extern fn main() void { let x int #?; x = X + 1 + Y; + let v Value = :None; + v = :Int 3; + printf("n %d\n", n.value); printf("n link %d\n", n.link.value); |