diff --git a/doc/go_spec.html b/doc/go_spec.html index d3dc7ce9a3..b63aba5b16 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,5 +1,5 @@ @@ -1688,25 +1688,6 @@ and a second goroutine receives them, the values are received in the order sent.

-

Type parameters

- -

-A type parameter is an (unqualified) type name declared in the -type parameter list of a -function declaration or -type definition; or in the receiver specification -of a method declaration that is associated -with a generic type. -A type parameter acts as a place holder for an (as of yet) unknown type in the declaration; -the type parameter is replaced with a type argument upon -instantiation of the generic function or type. -

- -

-The properties of a type parameter are determined by its -type constraint. -

-

Properties of types and values

Underlying types

@@ -1790,7 +1771,7 @@ depending on the direction of the directional channels present.

By definition, a core type is never a defined type, -type parameter, or +type parameter, or interface type.

@@ -2047,7 +2028,7 @@ to T.

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

@@ -2628,8 +2609,7 @@ func (l *List[T]) Len() int { … }

Type parameter lists

-A type parameter list declares the type parameters -in a generic function or type declaration. +A type parameter list declares the type parameters of a generic function or type declaration. The type parameter list looks like an ordinary function parameter list except that the type parameter names must all be present and the list is enclosed in square brackets rather than parentheses. @@ -2642,9 +2622,11 @@ TypeParamDecl = IdentifierList TypeConstraint .

-Each identifier declares a type parameter. All non-blank names in the list must be unique. -Each type parameter is a new and different named type. +Each name declares a type parameter, which is a new and different named type +that acts as a place holder for an (as of yet) unknown type in the declaration. +The type parameter is replaced with a type argument upon +instantiation of the generic function or type.

@@ -2686,6 +2668,12 @@ type T[P interface{*C}] …
 type T[P *C,] …
 
+

+Type parameters may also be declared by the receiver specification +of a method declaration associated +with a generic type. +

+

Type constraints

@@ -3829,7 +3817,7 @@ For a of map type M:

-For a of type parameter type P: +For a of type parameter type P: