]> Cypherpunks repositories - gostls13.git/commit
go/types: handle recursive type parameter constraints
authorRobert Findley <rfindley@google.com>
Wed, 8 Sep 2021 22:27:31 +0000 (18:27 -0400)
committerRobert Findley <rfindley@google.com>
Thu, 9 Sep 2021 12:56:36 +0000 (12:56 +0000)
commitd2a77f1c76dcc960d8548fa47ec29fcb1b2e5833
treebdb706cb01e6cf42a9ab4b1f540e1a492ac3305c
parent9e1eea6f8b0d0266c481df5bc3c808defeaa6f44
go/types: handle recursive type parameter constraints

This is a port of CL 348090 to go/types. Notably, unlike in types2,
declareTypeParams was previously setting the default constraint to the
empty interface, not nil, because this was missed in CL 335034 (no
changes were made to declareTypeParams). This CL fixes this discrepancy.

Change-Id: I0fa54a660ba14c6cbefa81a27ab7eb193df3be20
Reviewed-on: https://go-review.googlesource.com/c/go/+/348690
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>
src/go/types/decl.go
src/go/types/signature.go
src/go/types/testdata/fixedbugs/issue45550.go2 [new file with mode: 0644]
src/go/types/testdata/fixedbugs/issue47796.go2 [new file with mode: 0644]