From 9460f9f14dd68eb59d36f758272be936300a0440 Mon Sep 17 00:00:00 2001 From: lemon Date: Sun, 7 Aug 2022 17:57:22 +0200 Subject: fix template accessing future environment --- bootstrap/test2.cff | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bootstrap/test2.cff') 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 { } } +def X = 7 + 2; + struct Bit { - 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 = {#null, 0}; -- cgit v1.2.3