-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
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
cmd/compile: ICE on method value involving imported anonymous interface [1.20 backport] #58776
Comments
@mdempsky Please add a short backport rationale to this backport issue (see https://go.dev/wiki/MinorReleases; "The issue should include a link to the original issue and a short rationale about why the backport might be needed."). Thanks. |
Change https://go.dev/cl/472620 mentions this issue: |
Closed by merging 26eeaec to release-branch.go1.20. |
The assertion here was to make sure the newly constructed and typechecked expression selected the same receiver-qualified method, but in the case of anonymous receiver types we can actually end up with separate types.Field instances corresponding to each types.Type instance. In that case, the assertion spuriously failed. The fix here is to relax and assertion and just compare the method's name and type (including receiver type). Fixes #58776. Change-Id: I67d51ddb020e6ed52671473c93fc08f283a40886 Reviewed-on: https://go-review.googlesource.com/c/go/+/471676 Auto-Submit: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> (cherry picked from commit 37a2004) Reviewed-on: https://go-review.googlesource.com/c/go/+/472620 Auto-Submit: Dmitri Shuralyov <dmitshur@google.com> TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com>
The assertion here was to make sure the newly constructed and typechecked expression selected the same receiver-qualified method, but in the case of anonymous receiver types we can actually end up with separate types.Field instances corresponding to each types.Type instance. In that case, the assertion spuriously failed. The fix here is to relax and assertion and just compare the method's name and type (including receiver type). Fixes golang#58776. Change-Id: I67d51ddb020e6ed52671473c93fc08f283a40886 Reviewed-on: https://go-review.googlesource.com/c/go/+/471676 Auto-Submit: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> (cherry picked from commit 37a2004) Reviewed-on: https://go-review.googlesource.com/c/go/+/472620 Auto-Submit: Dmitri Shuralyov <dmitshur@google.com> TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com>
@mdempsky requested issue #58563 to be considered for backport to the next 1.20 minor release.
The text was updated successfully, but these errors were encountered: