From ab3332eea9cff20b465193a3ef3a8f6ce796da2f Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 14 Aug 2023 14:21:53 -0700 Subject: [PATCH] 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 --- doc/go_spec.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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. -- 2.44.0