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>
This commit is contained in:
Robert Griesemer 2022-01-25 19:12:35 -08:00
parent 55589e7531
commit 719e9894f9

View file

@ -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