After building jakt
with clang-15
and try the sample shown bellow I'm getting an error when trying to only run it:
uname -a
Linux laptop 5.4.0-135-generic #152~18.04.2-Ubuntu SMP Tue Nov 29 08:23:49 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
jakt -r fib.jakt
Error: comptime format accepts at most two arguments, but got 3
ββββ¬β fib.jakt:6:5
5 β let n: i32 = 10
6 β println("fib({}) = {}", n, fib(n: n))
β β°β comptime format accepts at most two arguments, but got 3
7 β }
ββββ΄β
Runtime error: Level 2 not synchronized (errno=45)
fib.jakt
/// Expect:
/// - output: "fib(10) = 89\n"
function main() {
let n: i32 = 10
println("fib({}) = {}", n, fib(n: n))
}
function fib(n: i32) -> i32 {
if n < 2 {
return 1
}
return fib(n: n-2)+fib(n: n-1)
}
Compile/run output:
$ jakt fib.jakt
Building: 1/4 (jakt__prelude__prelude.cpp)
Building: 2/4 (fib.cpp)
Building: 3/4 (jakt__prelude__iteration.cpp)
Building: 4/4 (jakt__prelude__string.cpp)
$ build/fib
fib(10) = 89
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too