diff --git a/doc/go_spec.html b/doc/go_spec.html index 11f44d896d..8643d94476 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -2269,7 +2269,6 @@ An identifier is exported if both: All other identifiers are not exported.
-
@@ -3715,6 +3714,26 @@ For a of map type M:
for the element type of M
+
+For a of type parameter type P:
+
P must have specific types.a[x] must be valid for values
+ of all specific types of P.P must be identical.
+ In this context, the element type of a string type is byte.P,
+ all specific types must be map types, and the respective key types
+ must be all identical.a[x] is the array, slice, or string element at index x,
+ or the map element with key x of the type argument
+ that P is instantiated with, and the type of a[x] is
+ the type of the (identical) element types.a[x] may not be assigned to if the specific types of P
+ include string types.
+
Otherwise a[x] is illegal.
+If the argument type is a type parameter P,
+P must have specific types, and
+the call len(e) (or cap(e) respectively) must be valid for
+each specific type of P.
+The result is the length (or capacity, respectively) of the argument whose type
+corresponds to the type argument with which P was
+instantiated.
+
The capacity of a slice is the number of elements for which there is space allocated in the underlying array.