Skip to content

Conversation

@bwplotka
Copy link

@bwplotka bwplotka commented Mar 2, 2023

I know it's not released yet, but new Go version will have new behaviour on panic(nil). Fixing to make it work, if you don't want to merge until current tip is released, feel free to close.

See behaviour by changing "dev" to "1.20": https://go.dev/play/p/Cevh9AJdhC6?v=gotip

I know it's not released yet, but new Go version will have new behaviour on `panic(nil)`. Fixing to make it work, if you don't want to merge until current tip is released, feel free to close.

See behaviour by changing "dev" to "1.20":  https://go.dev/play/p/Cevh9AJdhC6?v=gotip

Signed-off-by: bwplotka <bwplotka@google.com>
@dolmen
Copy link
Collaborator

dolmen commented Jul 4, 2023

The code should be more strict and instead check if errors.As(err, new(runtime.PanicNilError)). However that will require go1.21, so this check must be wrapped in a function func isPanicNilError(error) bool that must be declared in a separate Go source with a //go:build go1.21 tag.

@dolmen dolmen changed the title Updated didPanic to work with Go tip. Update didPanic to work with Go 1.21+ Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants