aboutsummaryrefslogtreecommitdiff
path: root/doc/go_spec.html
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2023-08-14 14:21:53 -0700
committerGopher Robot <gobot@golang.org>2023-08-17 22:56:50 +0000
commitab3332eea9cff20b465193a3ef3a8f6ce796da2f (patch)
treeced18b8a37fb642764f86e8bb8e0027dceb01941 /doc/go_spec.html
parent639f6f7e789ffbafd3d6f4327dbc10586e8163db (diff)
downloadgo-ab3332eea9cff20b465193a3ef3a8f6ce796da2f.tar.gz
go-ab3332eea9cff20b465193a3ef3a8f6ce796da2f.zip
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 <gri@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com>
Diffstat (limited to 'doc/go_spec.html')
-rw-r--r--doc/go_spec.html4
1 files 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 @@
<!--{
"Title": "The Go Programming Language Specification",
- "Subtitle": "Version of Aug 2, 2023",
+ "Subtitle": "Version of Aug 17, 2023",
"Path": "/ref/spec"
}-->
@@ -8488,7 +8488,7 @@ Finally, two types that are not bound type parameters unify loosely
identical <a href="#Interface_types">type terms</a>,
both or neither embed the predeclared type
<a href="#Predeclared_identifiers">comparable</a>,
- 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.
</li>