We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sample.go
package main type t1 uint8 const ( n1 t1 = iota n2 ) type T struct { elem [n2 + 1]int } func main() { println(len(T{}.elem)) }
$ go run ./sample.go 2
$ yaegi ./sample.go panic: reflect: call of reflect.Value.Int on uint8 Value goroutine 1 [running]: reflect.Value.Int(...) reflect/value.go:1459 github.com/traefik/yaegi/interp.nodeType2(0xc0000ed440, 0xc0000e8360, 0xc0003fafc0, {0xc0001a8f30, 0x1, 0x2}) github.com/traefik/yaegi/interp/type.go:454 +0x79e6 github.com/traefik/yaegi/interp.nodeType2(0xc0000ed440, 0xc0000e8360, 0xc0003fab40, {0xc000014818, 0x0, 0x1}) github.com/traefik/yaegi/interp/type.go:1034 +0x3b5e github.com/traefik/yaegi/interp.nodeType(...) github.com/traefik/yaegi/interp/type.go:399 github.com/traefik/yaegi/interp.(*Interpreter).gta.func1(0xc0003fa900) github.com/traefik/yaegi/interp/gta.go:308 +0x8ea github.com/traefik/yaegi/interp.(*node).Walk(0xc0003fa900, 0xc00045b910, 0x0) github.com/traefik/yaegi/interp/interp.go:288 +0x34 github.com/traefik/yaegi/interp.(*Interpreter).gta(0xc0000ed440, 0xc0003fa900, {0xc0002d6bb0, 0x4}, {0xc0002d6bb0, 0x4}, {0xc0002d6bb0, 0x4}) github.com/traefik/yaegi/interp/gta.go:20 +0x22b github.com/traefik/yaegi/interp.(*Interpreter).gtaRetry(0xc0000ed440?, {0xc000187af0?, 0xc0000c8900?, 0xc000187a38?}, {0xc0002d6bb0, 0x4}, {0xc0002d6bb0, 0x4}) github.com/traefik/yaegi/interp/gta.go:383 +0x154 github.com/traefik/yaegi/interp.(*Interpreter).CompileAST(0xc0000ed440, {0x557cc1815148?, 0xc0000c8900?}) github.com/traefik/yaegi/interp/program.go:87 +0x17f github.com/traefik/yaegi/interp.(*Interpreter).compileSrc(0xc0000ed440, {0xc0002a0b40?, 0x0?}, {0x7ffe60aa69d7?, 0xc0002a0b40?}, 0x98?) github.com/traefik/yaegi/interp/program.go:59 +0xb8 github.com/traefik/yaegi/interp.(*Interpreter).eval(0xc0000ed440, {0xc0002a0b40?, 0x98?}, {0x7ffe60aa69d7?, 0xc0002a0a00?}, 0x98?) github.com/traefik/yaegi/interp/interp.go:612 +0x28 github.com/traefik/yaegi/interp.(*Interpreter).EvalPath(0xc0000ed440, {0x7ffe60aa69d7, 0x1d}) github.com/traefik/yaegi/interp/interp.go:514 +0xab main.runFile(0x7ffe60aa69d7?, {0x7ffe60aa69d7, 0x1d}, 0x0) github.com/traefik/yaegi/cmd/yaegi/run.go:153 +0xee main.run({0xc000036050?, 0x1, 0x1}) github.com/traefik/yaegi/cmd/yaegi/run.go:116 +0xbec main.main() github.com/traefik/yaegi/cmd/yaegi/yaegi.go:144 +0x2cb
v0.14.2
This issue is related to #1419.
The text was updated successfully, but these errors were encountered:
interp: add missing conversion for non integer array dimension
2bb9715
Fixes #1451.
1e618df
Fixes traefik#1451.
b8301f1
Successfully merging a pull request may close this issue.
The following program
sample.go
triggers an unexpected resultExpected result
Got
Yaegi Version
v0.14.2
Additional Notes
This issue is related to #1419.
The text was updated successfully, but these errors were encountered: