mirror of
https://github.com/golang/go
synced 2024-11-02 11:50:30 +00: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
1 changed files with 1 additions and 0 deletions
|
@ -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
|
// names of embedded types (which should keep the name of
|
||||||
// the type param, not the instantiated type).
|
// the type param, not the instantiated type).
|
||||||
newfields[i] = types.NewField(f.Pos, f.Sym, t2)
|
newfields[i] = types.NewField(f.Pos, f.Sym, t2)
|
||||||
|
newfields[i].Embedded = f.Embedded
|
||||||
if f.Nname != nil && ts.Vars != nil {
|
if f.Nname != nil && ts.Vars != nil {
|
||||||
v := ts.Vars[f.Nname.(*ir.Name)]
|
v := ts.Vars[f.Nname.(*ir.Name)]
|
||||||
if v != nil {
|
if v != nil {
|
||||||
|
|
Loading…
Reference in a new issue