]> Cypherpunks repositories - gostls13.git/commitdiff
spec: document the underlying type of comparable
authorRobert Griesemer <gri@golang.org>
Wed, 26 Jan 2022 03:12:35 +0000 (19:12 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 26 Jan 2022 17:58:00 +0000 (17:58 +0000)
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>
doc/go_spec.html

index b25cf5fa6e2287f7792016d9c04a0ea9acccdc30..6f4aefcf4fd8ecfd249d6050e860bc2238441bc0 100644 (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