You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following program sample.go triggers an unexpected result
package main
import (
"fmt""github.com/traefik/yaegi/interp""github.com/traefik/yaegi/stdlib"
)
funcmain() {
i:=interp.New(interp.Options{})
i.Use(stdlib.Symbols) // commenting out this line prevents crashsyms:=i.Symbols("")
fmt.Println(syms)
}
Expected result
$ go run ./sample.go// lots of symbols here
Got
$ go run ./sample.go panic: reflect: call of MakeFunc with non-Func typegoroutine 1 [running]:reflect.MakeFunc({0x100dfb588, 0x100cfe680}, 0x140003cbe40) /opt/homebrew/Cellar/go/1.22.1/libexec/src/reflect/makefunc.go:48 +0x17cgithub.com/traefik/yaegi/interp.genFunctionWrapper.func1(0x140000e0420) /Users/oreilly/go/pkg/mod/github.com/traefik/[email protected]/interp/run.go:991 +0xe8github.com/traefik/yaegi/interp.(*Interpreter).Symbols(0x14000034d88, {0x0, 0x0}) /Users/oreilly/go/pkg/mod/github.com/traefik/[email protected]/interp/use.go:38 +0x408main.main() /Users/oreilly/tmp/test/sample.go:13 +0x58exit status 2
Yaegi Version
v0.16.1
Additional Notes
$ go version
go version go1.22.1 darwin/arm64
macbook
The text was updated successfully, but these errors were encountered:
The following program
sample.go
triggers an unexpected resultExpected result
Got
Yaegi Version
v0.16.1
Additional Notes
$ go version
go version go1.22.1 darwin/arm64
macbook
The text was updated successfully, but these errors were encountered: