v
v copied to clipboard
V can't compile `go println(fib(i))`
Hi medvednikov,
The following bug was found on Chrome with V version: V 0.0.10.
You just found a bug. V can't compile this program, but it should.
fn fib(n int) int {
if n <= 1 {
return n
}
return fib(n - 1) + fib(n - 2)
}
fn main() {
for i := 0; i < 10; i++ {
go println(fib(i))
}
}
Thanks, fixed.
println is a special generic function, and it didn't work with go.
It's much easier to just not allow it, at least for now, since calling go println() doesn't make much sense.
`go` cannot be used with `println`