From 8e94bb58ca91b26c0916210a179157b1280489be Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 8 Aug 2022 06:29:26 +0200 Subject: tweak --- bootstrap/test2.cff | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bootstrap/test2.cff') 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 { + None, + Some T +} + extern fn main() void { let n Node = {#null, 0}; let n Node = {&n, 1}; @@ -41,6 +46,9 @@ extern fn main() void { *f += 1.0f; } + let x = Option:Some 3; + let x = Option:None; + printf("n %d\n", n.value); printf("n link %d\n", n.link.value); -- cgit v1.2.3