-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Open
Copy link
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Description
Go version
go version go1.25.3 linux/amd64
Output of go env in your module/workspace:
GOVERSION='go1.25.3'What did you do?
package main
var e any = "error message"
func main() {
defer func() {
panic(e)
}()
panic(e)
}
What did you see happen?
panic: error message [recovered, repanicked]
goroutine 1 [running]:
main.main.func1()
/home/kylin/work/dupanic.go:7 +0x25
panic({0x475b00?, 0x501ba0?})
/home/kylin/.golang/go1.25.3/src/runtime/panic.go:783 +0x132
main.main()
/home/kylin/work/dupanic.go:9 +0x3e
What did you expect to see?
panic: error message
goroutine 1 [running]:
main.main.func1()
/home/kylin/work/dupanic.go:7 +0x25
panic({0x475b00?, 0x501ba0?})
/home/kylin/.golang/go1.25.3/src/runtime/panic.go:783 +0x132
main.main()
/home/kylin/work/dupanic.go:9 +0x3e
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Type
Projects
Status
No status