mirror of
https://github.com/golang/go
synced 2024-11-17 10:44:43 -07:00
[dev.typeparams] cmd/compile: properly copy tilde value for unions in types2-to-types1 conversion
Change-Id: I2211020141886b348cddf9e33ab31b71c8478987 Reviewed-on: https://go-review.googlesource.com/c/go/+/324811 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
e9ba0750b6
commit
1c947e4f31
@ -239,8 +239,9 @@ func (g *irgen) typ0(typ types2.Type) *types.Type {
|
||||
tlist := make([]*types.Type, nt)
|
||||
tildes := make([]bool, nt)
|
||||
for i := range tlist {
|
||||
term, _ := typ.Term(i)
|
||||
term, tilde := typ.Term(i)
|
||||
tlist[i] = g.typ1(term)
|
||||
tildes[i] = tilde
|
||||
}
|
||||
return types.NewUnion(tlist, tildes)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user