]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.typeparams] cmd/compile: properly copy tilde value for unions in types2-to-types...
authorDan Scales <danscales@google.com>
Thu, 3 Jun 2021 17:59:35 +0000 (10:59 -0700)
committerDan Scales <danscales@google.com>
Thu, 3 Jun 2021 19:59:18 +0000 (19:59 +0000)
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>

src/cmd/compile/internal/noder/types.go

index f34cf146bbd7adbb65bc6579467db61f165bfd57..f0061e79d709c2772f4c02486f52cd5b40180eca 100644 (file)
@@ -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)