diff options
author | Robert Griesemer <gri@golang.org> | 2022-01-25 19:12:35 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2022-01-26 17:58:00 +0000 |
commit | 719e9894f9a471cd74b8469d9231cd2798b33999 (patch) | |
tree | 0c56da7faf62e7a5a0d15f44f817650c02175384 | |
parent | 55589e7531c7e576a26f5610241a278caf6e4a4e (diff) | |
download | go-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.html | 3 |
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 |