]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: unalias tilde terms in underIs
authorTim King <taking@google.com>
Thu, 15 Aug 2024 23:48:42 +0000 (16:48 -0700)
committerTim King <taking@google.com>
Tue, 20 Aug 2024 16:48:38 +0000 (16:48 +0000)
commit1a90dcdaaf46d9dd0ee61781dcb9b6e05b80d926
treedd69a7ee53c70e27f6d135aa4a0190ab1fbe7354
parent6fb6ace3089edb868ceaefc2a804a794d6889574
go/types, types2: unalias tilde terms in underIs

Unalias the ~T terms during underIs. Before, if T was an alias
of U, it may pass T to the iteration function. The iterator
function expects an underlying type, under(U), to be passed.
This caused several bugs where underIs is used without
eventually taking the underlying type.

Updates #68935
Fixes #68903

Change-Id: Ie8691d8dddaea00e1dcba94d17c0f1b021fc49a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/606075
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
src/cmd/compile/internal/types2/typeset.go
src/go/types/typeset.go
src/internal/types/testdata/fixedbugs/issue68903.go [new file with mode: 0644]
src/internal/types/testdata/fixedbugs/issue68935.go [new file with mode: 0644]