aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/test2.cff
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-07 17:57:22 +0200
committerlemon <lsof@mailbox.org>2022-08-07 17:57:22 +0200
commit9460f9f14dd68eb59d36f758272be936300a0440 (patch)
treefbc50be52e28c1ad3cc05da58f9d5d4c315d4711 /bootstrap/test2.cff
parent855834ed40250f35fe5de5e304173ec69059e2fc (diff)
fix template accessing future environment
Diffstat (limited to 'bootstrap/test2.cff')
-rw-r--r--bootstrap/test2.cff8
1 files changed, 5 insertions, 3 deletions
diff --git a/bootstrap/test2.cff b/bootstrap/test2.cff
index 3532f4a..356312c 100644
--- a/bootstrap/test2.cff
+++ b/bootstrap/test2.cff
@@ -8,12 +8,14 @@ struct Node<T> {
}
}
+def X = 7 + 2;
+
struct Bit<T> {
- fn neg(x T) T { return ~x; }
+ fn neg(x T) T { return ~x + X; }
+ !fn neg(x T) T { return ~x + Y; }
}
-def X = 7 + 2,
- Y = 3.3;
+def Y = 3.3;
extern fn main() void {
let n Node<int> = {#null, 0};