From: Robert Griesemer Date: Mon, 14 Aug 2023 21:21:53 +0000 (-0700) Subject: spec: fix unification rule for inexact interface unification X-Git-Tag: go1.22rc1~1224 X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=ab3332eea9cff20b465193a3ef3a8f6ce796da2f;p=gostls13.git spec: fix unification rule for inexact interface unification 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). This change matches the fix https://go.dev/cl/519435. For #61879. Change-Id: I28b0a32d32626d85afd32e107efce141235a923d Reviewed-on: https://go-review.googlesource.com/c/go/+/519455 TryBot-Bypass: Robert Griesemer Reviewed-by: Ian Lance Taylor Reviewed-by: Robert Griesemer Auto-Submit: Robert Griesemer --- diff --git a/doc/go_spec.html b/doc/go_spec.html index c7b032b57e..301fdb3cf1 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -8488,7 +8488,7 @@ Finally, two types that are not bound type parameters unify loosely identical type terms, both or neither embed the predeclared type comparable, - corresponding method types unify per the element matching mode, + corresponding method types unify exactly, and the method set of one of the interfaces is a subset of the method set of the other interface.