From: Robert Griesemer Date: Sat, 8 Nov 2025 03:52:27 +0000 (-0800) Subject: spec: more precise prose for special case of append X-Git-Tag: go1.26rc1~332 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5241d114f55cfa69a4bf8f2051f5d83d1f618859;p=gostls13.git spec: more precise prose for special case of append As written, the special case for append may be interpreted such that any first argument that is assignable to []byte is permissible, including nil. This change makes makes it clear that a slice argument is required. Not a language change. The compiler always expected a slice argument. Fixes #76226. Change-Id: I73a1725d10096690335d6edf5793beb5de73578f Reviewed-on: https://go-review.googlesource.com/c/go/+/718880 Reviewed-by: Junyang Shao Reviewed-by: Alan Donovan Reviewed-by: Robert Griesemer LUCI-TryBot-Result: Go LUCI Auto-Submit: Robert Griesemer Reviewed-by: Ian Lance Taylor --- diff --git a/doc/go_spec.html b/doc/go_spec.html index d6c7962a96..514f60007b 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -7383,8 +7383,8 @@ The values x are passed to a parameter of type ...E where E is the element type of S and the respective parameter passing rules apply. -As a special case, append also accepts a first argument assignable -to type []byte with a second argument of string type followed by +As a special case, append also accepts a slice whose type is assignable to +type []byte with a second argument of string type followed by .... This form appends the bytes of the string.