v
v copied to clipboard
Weird one-element array argument handling
Input:
fn main() {
a := [0]
println(a)
}
Expected output:
[0]
Output:
You just found a bug. V can't compile this program, but it should. Please create a GitHub issue.
Let a be [0, 1]. Another try... [0, 1]
Let a be [0], instead of println(a) we place println(a.str()). Once more...
dot(): cannot find type `[0]println`
Now any function placed instead of println produces a similar error.
Fixed.