]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.23] go/types, types2: unalias tilde terms in underIs
authorTim King <taking@google.com>
Thu, 15 Aug 2024 23:48:42 +0000 (16:48 -0700)
committerMichael Pratt <mpratt@google.com>
Wed, 28 Aug 2024 18:10:23 +0000 (18:10 +0000)
commit9625a7faaefd85ce9dd0b7efbaad7731c2018200
tree61e5c6bd0485c975705a5f4a51d2b57928c57aea
parent9c939a1e60ba1fa89251b5ef43793542aa68ff4e
[release-branch.go1.23] 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.

Fixes #68905

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>
(cherry picked from commit 1a90dcdaaf46d9dd0ee61781dcb9b6e05b80d926)
Reviewed-on: https://go-review.googlesource.com/c/go/+/607635
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]