]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: use exact unification when comparing interface methods
authorRobert Griesemer <gri@golang.org>
Mon, 14 Aug 2023 21:07:56 +0000 (14:07 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 15 Aug 2023 19:42:56 +0000 (19:42 +0000)
commit197522d3ae9e033bc51c5700cf4f7743fb624d8b
treea351f3b1e78cce4ae03c41660ac974593f032942
parentdd307f193b36e9c249ca763dd65d4db6395de665
go/types, types2: use exact unification when comparing interface methods

Irrespective of whether unification is exact or inexact, method
signatures of interfaces must always match exactly: a type never
satisfies/implements an interface if relevant method signatures
are different (i.e., not identical, possibly after substitution).

Fixes #61879.

Change-Id: I20c0aa28ac86e2edec615b40f2269938e4a96938
Reviewed-on: https://go-review.googlesource.com/c/go/+/519435
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/unify.go
src/go/types/unify.go
src/internal/types/testdata/fixedbugs/issue61879.go [new file with mode: 0644]