aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/subr.go
diff options
context:
space:
mode:
authorDan Scales <danscales@google.com>2021-06-13 11:05:45 -0700
committerDan Scales <danscales@google.com>2021-06-18 16:33:06 +0000
commite9c01f980403ef88340ded62d78b4cd3a4b592f8 (patch)
tree4b7cf4f02ea0a1e17a4d89b74833aeaa4c7db8ce /src/cmd/compile/internal/typecheck/subr.go
parent6fa043795870305d96a1e4c0f276ac431f688524 (diff)
downloadgo-e9c01f980403ef88340ded62d78b4cd3a4b592f8.tar.gz
go-e9c01f980403ef88340ded62d78b4cd3a4b592f8.zip
[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>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/subr.go')
-rw-r--r--src/cmd/compile/internal/typecheck/subr.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/typecheck/subr.go b/src/cmd/compile/internal/typecheck/subr.go
index 79b2402fe7..fb6d660db5 100644
--- a/src/cmd/compile/internal/typecheck/subr.go
+++ b/src/cmd/compile/internal/typecheck/subr.go
@@ -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 {