traefik / yaegi

Yaegi is Another Elegant Go Interpreter
https://pkg.go.dev/github.com/traefik/yaegi
Apache License 2.0
6.82k stars 342 forks source link

interp: fix computation of array size from constant expression #1539

Closed mvertes closed 1 year ago

mvertes commented 1 year ago

The result of the expression giving the size of an array may be an int instead of constant.Value in case of an out of order declaration. Handle both cases.

Fixes #1536.