From 89bac537165bf262594cca343cb45e16a2167145 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Mon, 6 Jan 2025 01:05:21 +0200 Subject: implement move checking further + Enough that examples still compile, but missing references etc. --- examples/fib.fwd | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'examples/fib.fwd') diff --git a/examples/fib.fwd b/examples/fib.fwd index be2b63f..e5014af 100644 --- a/examples/fib.fwd +++ b/examples/fib.fwd @@ -5,17 +5,19 @@ fib(int n, (int) res) { - if n < 2 { + fwd_copy(n) => int n1, int n2; + if n1 < 2 { res(1); } else { - fib(n - 1) => int f1; - fib(n - 2) => int f2; + fib(n2 - 1) => int f1; + fib(n2 - 2) => int f2; res(f1 + f2); } } /* 'extern' println */ -fwd_println(int n); +fwd_println(auto n); +fwd_copy(auto n, (auto, auto) n1); main() { -- cgit v1.2.3