mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
spec: clarify that comparable cannot be a union element
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>
This commit is contained in:
parent
55a25aa6ca
commit
2bdf34f3e8
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue