aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/test2.cff
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-08 06:29:26 +0200
committerlemon <lsof@mailbox.org>2022-08-08 06:29:26 +0200
commit8e94bb58ca91b26c0916210a179157b1280489be (patch)
treed42f1a4842b34ba282213f290a05582e2e515dd8 /bootstrap/test2.cff
parentc6ea883724ed389143dbed1806916aa09157b655 (diff)
tweak
Diffstat (limited to 'bootstrap/test2.cff')
-rw-r--r--bootstrap/test2.cff8
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);