@@ -7116,8 +7116,9 @@ <h3 id="Making_slices_maps_and_channels">Making slices, maps and channels</h3>
71167116
71177117
71187118< p >
7119- Each of the size arguments < code > n</ code > and < code > m</ code > must be of < a href ="#Numeric_types "> integer type</ a >
7120- or an untyped < a href ="#Constants "> constant</ a > .
7119+ Each of the size arguments < code > n</ code > and < code > m</ code > must be of < a href ="#Numeric_types "> integer type</ a > ,
7120+ have a < a href ="#Interface_types "> type set</ a > containing only integer types,
7121+ or be an untyped < a href ="#Constants "> constant</ a > .
71217122A constant size argument must be non-negative and < a href ="#Representability "> representable</ a >
71227123by a value of type < code > int</ code > ; if it is an untyped constant it is given type < code > int</ code > .
71237124If both < code > n</ code > and < code > m</ code > are provided and are constant, then
@@ -7154,9 +7155,9 @@ <h3 id="Appending_and_copying_slices">Appending to and copying slices</h3>
71547155< p >
71557156The < a href ="#Function_types "> variadic</ a > function < code > append</ code >
71567157appends zero or more values < code > x</ code > to a slice < code > s</ code >
7157- and returns the resulting slice.
7158+ and returns the resulting slice of the same type as < code > s </ code > .
71587159The < a href ="#Core_types "> core type</ a > of < code > s</ code > must be a slice
7159- of the form < code > []E</ code > .
7160+ of type < code > []E</ code > .
71607161The values < code > x</ code > are passed to a parameter of type < code > ...E</ code >
71617162and the respective < a href ="#Passing_arguments_to_..._parameters "> parameter
71627163passing rules</ a > apply.
@@ -7166,7 +7167,7 @@ <h3 id="Appending_and_copying_slices">Appending to and copying slices</h3>
71667167</ p >
71677168
71687169< pre class ="grammar ">
7169- append(s S, x ...E) S // E is the element type of the core type of S
7170+ append(s S, x ...E) S // core type of S is []E
71707171</ pre >
71717172
71727173< p >
@@ -7922,11 +7923,17 @@ <h3 id="Package_unsafe">Package <code>unsafe</code></h3>
79227923func Slice(ptr *ArbitraryType, len IntegerType) []ArbitraryType
79237924</ pre >
79247925
7926+ <!--
7927+ These conversions also apply to type parameters with suitable core types.
7928+ Determine if we can simply use core type insted of underlying type here,
7929+ of if the general conversion rules take care of this.
7930+ -->
7931+
79257932< p >
79267933A < code > Pointer</ code > is a < a href ="#Pointer_types "> pointer type</ a > but a < code > Pointer</ code >
79277934value may not be < a href ="#Address_operators "> dereferenced</ a > .
7928- Any pointer or value of < a href ="#Types "> underlying type</ a > < code > uintptr</ code > can be converted to
7929- a type of underlying type < code > Pointer</ code > and vice versa.
7935+ Any pointer or value of < a href ="#Types "> underlying type</ a > < code > uintptr</ code > can be
7936+ < a href =" #Conversions " > converted </ a > to a type of underlying type < code > Pointer</ code > and vice versa.
79307937The effect of converting between < code > Pointer</ code > and < code > uintptr</ code > is implementation-defined.
79317938</ p >
79327939
@@ -7973,7 +7980,8 @@ <h3 id="Package_unsafe">Package <code>unsafe</code></h3>
79737980
79747981< p >
79757982A (variable of) type < code > T</ code > has < i > variable size</ i > if < code > T</ code >
7976- is a type parameter, or if it is an array or struct type containing elements
7983+ is a < a href ="#Type_parameter_declarations "> type parameter</ a > , or if it is an
7984+ array or struct type containing elements
79777985or fields of variable size. Otherwise the size is < i > constant</ i > .
79787986Calls to < code > Alignof</ code > , < code > Offsetof</ code > , and < code > Sizeof</ code >
79797987are compile-time < a href ="#Constant_expressions "> constant expressions</ a > of
0 commit comments