aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2022-01-25 19:12:35 -0800
committerRobert Griesemer <gri@golang.org>2022-01-26 17:58:00 +0000
commit719e9894f9a471cd74b8469d9231cd2798b33999 (patch)
tree0c56da7faf62e7a5a0d15f44f817650c02175384
parent55589e7531c7e576a26f5610241a278caf6e4a4e (diff)
downloadgo-719e9894f9a471cd74b8469d9231cd2798b33999.tar.gz
go-719e9894f9a471cd74b8469d9231cd2798b33999.zip
spec: document the underlying type of comparable
For #50791. Change-Id: I7f135bb6626128a3cee9fd71c57535c1fc83ac7f Reviewed-on: https://go-review.googlesource.com/c/go/+/380854 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r--doc/go_spec.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html
index b25cf5fa6e..6f4aefcf4f 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -820,7 +820,8 @@ An alias denotes a named type if the type given in the alias declaration is a na
<p>
Each type <code>T</code> has an <i>underlying type</i>: If <code>T</code>
-is one of the predeclared boolean, numeric, or string types, or a type literal,
+is one of the predeclared boolean, numeric, or string types, the predeclared
+type <code>comparable</code>, or a type literal,
the corresponding underlying type is <code>T</code> itself.
Otherwise, <code>T</code>'s underlying type is the underlying type of the
type to which <code>T</code> refers in its <a href="#Type_declarations">type