Odin icon indicating copy to clipboard operation
Odin copied to clipboard

Slice of fixed array literal is initialized all nils vs literal values

Open z7x3q5 opened this issue 4 months ago • 0 comments

Incorrect initialization of variable of any type Slice of fixed array literal of type any is initialized with nils vs provided literal values

package main
import "core:fmt"
main :: proc() {
    a: [][2]any = {
        0 ..< 2 = 100,
    }
    fmt.println(a) // [[<nil>, <nil>], [<nil>, <nil>]]
}

should be

[[100, 100], [100, 100]]

z7x3q5 avatar Jun 15 '25 18:06 z7x3q5