traefik / yaegi

Yaegi is Another Elegant Go Interpreter

Home Page:https://pkg.go.dev/github.com/traefik/yaegi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

out of order constant used in array size definition

mvertes opened this issue · comments

The following program sample.go triggers an unexpected result

package main

type T struct {
        num [tnum + 2]int
}

const tnum = 23

func main() {
        t := T{}
        println(len(t.num))
}

Expected result

$ go run ./sample.go
25

Got

$ yaegi ./sample.go
./sample.go:11:14: undefined selector: num

Yaegi Version

v0.14.2

Additional Notes

No response