For #62640.
For #61394.
This is a copy of https://go-review.googlesource.com/c/go/+/528402,
which has stalled in review and the owner is no longer working on Go.
Change-Id: Ic7a1ae65c70d4857ab1061ccae1a926bf5c4ff55
Reviewed-on: https://go-review.googlesource.com/c/go/+/681235
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
--- /dev/null
+//
+PACKAGE issue62640
+
+IMPORTPATH
+ testdata/issue62640
+
+FILENAMES
+ testdata/issue62640.go
+
+TYPES
+ //
+ type E struct{}
+
+ // F should be hidden within S because of the S.F field.
+ func (E) F()
+
+ //
+ type S struct {
+ E
+ F int
+ }
+
--- /dev/null
+//
+PACKAGE issue62640
+
+IMPORTPATH
+ testdata/issue62640
+
+FILENAMES
+ testdata/issue62640.go
+
+TYPES
+ //
+ type E struct{}
+
+ // F should be hidden within S because of the S.F field.
+ func (E) F()
+
+ //
+ type S struct {
+ E
+ F int
+ }
+
--- /dev/null
+//
+PACKAGE issue62640
+
+IMPORTPATH
+ testdata/issue62640
+
+FILENAMES
+ testdata/issue62640.go
+
+TYPES
+ //
+ type E struct{}
+
+ // F should be hidden within S because of the S.F field.
+ func (E) F()
+
+ //
+ type S struct {
+ E
+ F int
+ }
+
+ // F should be hidden within S because of the S.F field.
+ func (S) F()
+
--- /dev/null
+// Copyright 2025 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 issue62640
+
+type E struct{}
+
+// F should be hidden within S because of the S.F field.
+func (E) F() {}
+
+type S struct {
+ E
+ F int
+}