Fixes #52633
Change-Id: I3f19804cd7c00cee7e365062402c264d84b596c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/403316
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: guangyuan zhou <zhouguangyuan@golangcn.org>
// Note: DUPOK is required to ensure that we don't end up with more
// than one type descriptor for a given type, if the type descriptor
- // can be defined in multiple packages, that is, unnamed types and
- // instantiated types.
+ // can be defined in multiple packages, that is, unnamed types,
+ // instantiated types and shape types.
dupok := 0
- if tbase.Sym() == nil || tbase.IsFullyInstantiated() {
+ if tbase.Sym() == nil || tbase.IsFullyInstantiated() || tbase.HasShape() {
dupok = obj.DUPOK
}