diff options
Diffstat (limited to 'bootstrap/test2.cff')
| -rw-r--r-- | bootstrap/test2.cff | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bootstrap/test2.cff b/bootstrap/test2.cff index c0fafc5..b94a74e 100644 --- a/bootstrap/test2.cff +++ b/bootstrap/test2.cff @@ -24,6 +24,11 @@ enum union Value { Flo f32, } +enum union Option<T> { + None, + Some T +} + extern fn main() void { let n Node<int> = {#null, 0}; let n Node<int> = {&n, 1}; @@ -41,6 +46,9 @@ extern fn main() void { *f += 1.0f; } + let x = Option<int>:Some 3; + let x = Option<f32>:None; + printf("n %d\n", n.value); printf("n link %d\n", n.link.value); |