From: Robert Griesemer Date: Mon, 13 Jun 2022 18:06:55 +0000 (-0700) Subject: spec: clarify behavior of map size hint for make built-in X-Git-Tag: go1.19rc1~136 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5ee939b8199266446d7ccc563751a9d3db26bf8b;p=gostls13.git spec: clarify behavior of map size hint for make built-in The spec already states that the precise behavior of the map size hint provided to the make built-in is implementation-dependent. Exclude requiring specific run-time behavior for maps. (The current Go compiler does not panic if the size hint is negative at run-time.) Fixes #53219. Change-Id: I2f3618bf9ba4ed921e18dc4f2273eaa770805bd7 Reviewed-on: https://go-review.googlesource.com/c/go/+/411919 Reviewed-by: Keith Randall Reviewed-by: Ian Lance Taylor Reviewed-by: Keith Randall --- diff --git a/doc/go_spec.html b/doc/go_spec.html index 170c359c87..b5f6c5fd65 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -7141,7 +7141,7 @@ A constant size argument must be non-negative and re by a value of type int; if it is an untyped constant it is given type int. If both n and m are provided and are constant, then n must be no larger than m. -If n is negative or larger than m at run time, +For slices and channels, if n is negative or larger than m at run time, a run-time panic occurs.