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 Err struct { err string } func (e Err) Error() string { return e.err } func main() { var E = Err{"error"} var err error = E switch err { case nil: case E: } }
No output, but running normally
e.go:12:10: panic run: reflect.Value.Convert: value of type error cannot be converted to type struct { Xerr string } goroutine 1 [running]: runtime/debug.Stack() .../runtime/debug/stack.go:24 +0x5e github.com/traefik/yaegi/interp.(*Interpreter).Execute.func1() .../github.com/traefik/yaegi@v0.15.1/interp/program.go:146 +0x7e panic({0xfdea20?, 0xc000043f10?}) .../runtime/panic.go:914 +0x21f github.com/traefik/yaegi/interp.runCfg.func1() .../github.com/traefik/yaegi@v0.15.1/interp/run.go:205 +0x185 panic({0xfdea20?, 0xc000043f10?}) .../runtime/panic.go:914 +0x21f reflect.Value.Convert({0x1038aa0?, 0xc000043e90?, 0xc00008aa80?}, {0x12e6108, 0xc00008aa80}) .../reflect/value.go:3319 +0x12c github.com/traefik/yaegi/interp._case.func7(0xc0000ca630?) .../github.com/traefik/yaegi@v0.15.1/interp/run.go:3115 +0x1b7 github.com/traefik/yaegi/interp.runCfg(0xc000331b80, 0xc0000ca630, 0x4?, 0x0?) .../github.com/traefik/yaegi@v0.15.1/interp/run.go:213 +0x285 github.com/traefik/yaegi/interp.(*Interpreter).run(0xc0000dd440, 0xc000330dc0, 0xc0000ca420?) .../github.com/traefik/yaegi@v0.15.1/interp/run.go:119 +0x3c5 github.com/traefik/yaegi/interp.(*Interpreter).Execute(0xc0000dd440, 0xc000334930) .../github.com/traefik/yaegi@v0.15.1/interp/program.go:172 +0x225 github.com/traefik/yaegi/interp.(*Interpreter).eval(0xc0000dd440, {0xc000210840?, 0xbd?}, {0xc00000a0d0?, 0x200?}, 0xc0?) .../github.com/traefik/yaegi@v0.15.1/interp/interp.go:565 +0x55 github.com/traefik/yaegi/interp.(*Interpreter).EvalPath(0xc0000dd440, {0xc00000a0d0, 0x4}) .../github.com/traefik/yaegi@v0.15.1/interp/interp.go:514 +0xa6 main.runFile(0xc00000a0d0?, {0xc00000a0d0, 0x4}, 0x0) .../github.com/traefik/yaegi@v0.15.1/cmd/yaegi/run.go:153 +0xd7 main.run({0xc0000880a0?, 0x1, 0x2}) .../github.com/traefik/yaegi@v0.15.1/cmd/yaegi/run.go:116 +0xb97 main.main() .../github.com/traefik/yaegi@v0.15.1/cmd/yaegi/yaegi.go:133 +0xca
v0.15.1
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following program
sample.go
triggers an unexpected resultExpected result
No output, but running normally
Got
Yaegi Version
v0.15.1
Additional Notes
No response
The text was updated successfully, but these errors were encountered: