mirror of
https://github.com/golang/go
synced 2024-11-22 20:40:03 -07:00
[dev.typeparams] cmd/compile: add missing copy of Field.Embedded in type substituter.
Change-Id: I876933370a6bcb6586eda9d8fc28a081bf31b1cf Reviewed-on: https://go-review.googlesource.com/c/go/+/328511 Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Trust: Dan Scales <danscales@google.com>
This commit is contained in:
parent
6fa0437958
commit
e9c01f9804
@ -1220,6 +1220,7 @@ func (ts *Tsubster) tstruct(t *types.Type, force bool) *types.Type {
|
||||
// names of embedded types (which should keep the name of
|
||||
// the type param, not the instantiated type).
|
||||
newfields[i] = types.NewField(f.Pos, f.Sym, t2)
|
||||
newfields[i].Embedded = f.Embedded
|
||||
if f.Nname != nil && ts.Vars != nil {
|
||||
v := ts.Vars[f.Nname.(*ir.Name)]
|
||||
if v != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user