Commit bd6628e6 authored by Cherry Zhang's avatar Cherry Zhang
Browse files

cmd/compile: check deferred nil interface call before wrapping it

Currently, for "defer i.M()" if i is nil it panics at the point of
defer statement, not when deferred function is called. We need to
do the nil check before wrapping it.

Updates #40724.

Change-Id: I62c669264668991f71999e2cf4610a9066247f9d
Reviewed-on: https://go-review.googlesource.com/c/go/+/305549


Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: default avatarDavid Chase <drchase@google.com>
Reviewed-by: default avatarThan McIntosh <thanm@google.com>
parent 4e1bf8ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment