]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: change types2.Union API to accept a list of Terms
authorRobert Griesemer <gri@golang.org>
Thu, 5 Aug 2021 20:24:15 +0000 (13:24 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 6 Aug 2021 20:34:51 +0000 (20:34 +0000)
commit0d7dc417eaebd35249994bfd5cf211df9bf457c6
treea97725bf356d9d5c20da6f3b8d55b49f3f0dfb17
parent09d82689ed899d601a9f4b5615d67025dcdb958b
[dev.typeparams] cmd/compile: change types2.Union API to accept a list of Terms

Instead of providing a list of tildes and types, use a list of
Terms to create a Union, with suitable accessors.

Define the (exported) notion of a Term representing a union term.

This simplified various uses and also will be easier to extend
should we want to add more information to a Term in the future.

Change-Id: I52fd73938bfa11bac60adbf10580b6d0680df4f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/340250
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
src/cmd/compile/internal/importer/iimport.go
src/cmd/compile/internal/noder/reader2.go
src/cmd/compile/internal/noder/types.go
src/cmd/compile/internal/noder/writer.go
src/cmd/compile/internal/types2/builtins.go
src/cmd/compile/internal/types2/subst.go
src/cmd/compile/internal/types2/typeset.go
src/cmd/compile/internal/types2/typestring.go
src/cmd/compile/internal/types2/union.go