summaryrefslogtreecommitdiff
path: root/test/fixedbugs/issue58563.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2023-02-21 13:16:22 -0800
committerGopher Robot <gobot@golang.org>2023-03-01 20:26:10 +0000
commit37a2004b431df6cdd3260cbfe2ddb7673e94b9ef (patch)
treecc757915c16f21d92f621db221c9192383077ba4 /test/fixedbugs/issue58563.go
parent70efe9f721d70f57eba8896ffd3939723e0f0b4a (diff)
downloadgo-git-37a2004b431df6cdd3260cbfe2ddb7673e94b9ef.tar.gz
cmd/compile: relax overly strict assertion
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 #58563. 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>
Diffstat (limited to 'test/fixedbugs/issue58563.go')
-rw-r--r--test/fixedbugs/issue58563.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/fixedbugs/issue58563.go b/test/fixedbugs/issue58563.go
new file mode 100644
index 0000000000..5c4c5c0a8f
--- /dev/null
+++ b/test/fixedbugs/issue58563.go
@@ -0,0 +1,7 @@
+// compiledir
+
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored