]> Cypherpunks repositories - gostls13.git/commit
go/types: implement type sets with term lists
authorRobert Findley <rfindley@google.com>
Sun, 15 Aug 2021 19:28:22 +0000 (15:28 -0400)
committerRobert Findley <rfindley@google.com>
Mon, 16 Aug 2021 12:54:34 +0000 (12:54 +0000)
commitd043c8ea89d27d2bcb05276b54dc9d5894e8fc2a
treeb680bbd17bcea70d7e73b9c98f8d4a702aa84d55
parent94002f6fcafb0e81ff9c5f12a28c21435534cb40
go/types: implement type sets with term lists

This is a port of CL 338310 to go/types. It is superficially adjusted
for different error reporting and AST APIs. It also fixes a bug in CL
338310 that only manifests in go/types (TestFixedbugs/issue39755.go2)
due to go/types preserving untyped nil. In that CL, operand.go is
checking if optype is a TypeParam, which can never be the case. A fix
for types2 will be mailed in a separate CL.

Change-Id: Icf3394e74baec536842267d99f7511d25ab32a8a
Reviewed-on: https://go-review.googlesource.com/c/go/+/342331
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
23 files changed:
src/go/types/builtins.go
src/go/types/infer.go
src/go/types/instantiate.go
src/go/types/interface.go
src/go/types/operand.go
src/go/types/predicates.go
src/go/types/sizeof_test.go
src/go/types/stmt.go
src/go/types/subst.go
src/go/types/termlist.go
src/go/types/testdata/check/tinference.go2
src/go/types/testdata/check/typeinst2.go2
src/go/types/testdata/check/typeparams.go2
src/go/types/testdata/examples/constraints.go2
src/go/types/testdata/fixedbugs/issue41124.go2
src/go/types/type.go
src/go/types/typeparam.go
src/go/types/typeset.go
src/go/types/typestring.go
src/go/types/typexpr.go
src/go/types/unify.go
src/go/types/union.go
src/go/types/universe.go