aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/devirtualize/devirtualize.go
diff options
context:
space:
mode:
authorMateusz Poliwczak <mpoliwczak34@gmail.com>2025-10-12 11:15:11 +0200
committerMateusz Poliwczak <mpoliwczak34@gmail.com>2025-10-14 09:33:37 -0700
commit5a9ef44bc05b937cff2394b5880ecca616cb878e (patch)
tree36625f69eca33d433042eea27392f55eadb9506d /src/cmd/compile/internal/devirtualize/devirtualize.go
parent3765758b96746e202bb52312d4b026085a0f25a1 (diff)
downloadgo-5a9ef44bc05b937cff2394b5880ecca616cb878e.tar.xz
cmd/compile/internal/devirtualize: fix OCONVNOP assertion
Fixes #75863 Change-Id: I1e5a0f3880dcd5f820a5b6f4540c49b16a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/711141 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Lasse Folger <lassefolger@google.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/compile/internal/devirtualize/devirtualize.go')
-rw-r--r--src/cmd/compile/internal/devirtualize/devirtualize.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/devirtualize/devirtualize.go b/src/cmd/compile/internal/devirtualize/devirtualize.go
index 9d4160085e..363cd6f2e5 100644
--- a/src/cmd/compile/internal/devirtualize/devirtualize.go
+++ b/src/cmd/compile/internal/devirtualize/devirtualize.go
@@ -223,7 +223,7 @@ func concreteType1(s *State, n ir.Node, seen map[*ir.Name]struct{}) (outT *types
switch n1 := n.(type) {
case *ir.ConvExpr:
if n1.Op() == ir.OCONVNOP {
- if !n1.Type().IsInterface() || !types.Identical(n1.Type(), n1.X.Type()) {
+ if !n1.Type().IsInterface() || !types.Identical(n1.Type().Underlying(), n1.X.Type().Underlying()) {
// As we check (directly before this switch) whether n is an interface, thus we should only reach
// here for iface conversions where both operands are the same.
base.Fatalf("not identical/interface types found n1.Type = %v; n1.X.Type = %v", n1.Type(), n1.X.Type())