v icon indicating copy to clipboard operation
v copied to clipboard

Weird one-element array argument handling

Open Undumendil opened this issue 7 years ago • 1 comments

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.

Undumendil avatar Jun 18 '19 22:06 Undumendil

Fixed.

medvednikov avatar Jun 18 '19 22:06 medvednikov