]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.typeparams] cmd/compile/internal/types2: clean up type set/union intersection
authorRobert Griesemer <gri@golang.org>
Fri, 28 May 2021 02:03:16 +0000 (19:03 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 2 Jun 2021 23:19:26 +0000 (23:19 +0000)
commit848b58e47357965dc5a61fb0ae5535da717e2633
treedd6a3154d729d12cc059eee6418657ab7c747609
parent97cb0113a358a24931bc91c956da0cb023f2776c
[dev.typeparams] cmd/compile/internal/types2: clean up type set/union intersection

- Eliminate the need for bottom type: This is now represented by
  an empty union (denoting the set of no types).

- Clean up type set intersection and incorporate tilde information
  in intersection operation and satisfaction tests.

- Minor cleanups along the way.

- Note: The intersection algorithm does not always compute the
        largest possible intersection. To be addressed in a follow-up CL.

Change-Id: I7fa19df5996da36a4d8f29300d30a0aa4d8a3e5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/323354
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/types2/interface.go
src/cmd/compile/internal/types2/predicates.go
src/cmd/compile/internal/types2/sanitize.go
src/cmd/compile/internal/types2/sizeof_test.go
src/cmd/compile/internal/types2/subst.go
src/cmd/compile/internal/types2/testdata/check/issues.go2
src/cmd/compile/internal/types2/testdata/examples/constraints.go2
src/cmd/compile/internal/types2/type.go
src/cmd/compile/internal/types2/typestring.go
src/cmd/compile/internal/types2/union.go