From 719e9894f9a471cd74b8469d9231cd2798b33999 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Tue, 25 Jan 2022 19:12:35 -0800 Subject: [PATCH] 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 Reviewed-by: Ian Lance Taylor --- doc/go_spec.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index b25cf5fa6e2..6f4aefcf4fd 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

Each type T has an underlying type: If T -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 comparable, or a type literal, the corresponding underlying type is T itself. Otherwise, T's underlying type is the underlying type of the type to which T refers in its type