From 003e7faf53a3e7d0e280871447c60922bff89bcf Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Sat, 20 Nov 2021 13:29:02 -0800 Subject: [PATCH] spec: adjust representability rules for type parameters Change-Id: I4423a059527066c4418c195911f8184dfd3f5a15 Reviewed-on: https://go-review.googlesource.com/c/go/+/365914 Trust: Robert Griesemer Reviewed-by: Ian Lance Taylor --- doc/go_spec.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index 176e1a755d8..186600f0150 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1876,7 +1876,9 @@ by a value of type T.

A constant x is representable -by a value of type T if one of the following conditions applies: +by a value of type T, +where T is not a type parameter, +if one of the following conditions applies:

    @@ -1899,6 +1901,12 @@ are representable by values of T's component type (float32
+

+If T is a type parameter with specific types, +x is representable by a value of type T if x is representable +by a value of each specific type of T. +

+
 x                   T           x is representable by a value of T because