]> Cypherpunks repositories - gostls13.git/commitdiff
spec: clarify that comparable cannot be a union element
authorRobert Griesemer <gri@golang.org>
Thu, 16 Dec 2021 04:03:11 +0000 (20:03 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 17 Dec 2021 03:28:05 +0000 (03:28 +0000)
For #49602.

Change-Id: I0d3ff8f087dffb3409918494147fd1dceff7514d
Reviewed-on: https://go-review.googlesource.com/c/go/+/372694
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/go_spec.html

index cb57aa301cbf4430b5414f0b85805f5a0e92a3ae..ed98f5375f19bb10eb637e3812ca0cc164b839f7 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification - Go 1.18 Draft (incomplete)",
-       "Subtitle": "Version of Dec 13, 2021",
+       "Subtitle": "Version of Dec 16, 2021",
        "Path": "/ref/spec"
 }-->
 
@@ -1532,7 +1532,9 @@ interface {
 <p>
 Implementation restriction:
 A union with more than one term cannot contain interface types
-with non-empty <a href="#Method_sets">method sets</a>.
+with non-empty <a href="#Method_sets">method sets</a> or which
+are or embed the <a href="#Predeclared_identifiers">predeclared identifier</a>
+<code>comparable</code>.
 </p>
 
 <p>