Skip to content

Commit 2ac43d5

Browse files
committed
doc: minor clarification regarding the sharing of underlying arrays
The last sentence in the section on slice expressions could be read as if it might apply to strings. Changed the sentence a bit to emphasize its applicability to slices only. See also the issue for more background. Fixes golang#19220. Change-Id: I8551f34230e4ed93f951e7b871cc81f54a5874a9 Reviewed-on: https://go-review.googlesource.com/59890 Reviewed-by: Rob Pike <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 64607db commit 2ac43d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/go_spec.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--{
22
"Title": "The Go Programming Language Specification",
3-
"Subtitle": "Version of August 25, 2017",
3+
"Subtitle": "Version of August 30, 2017",
44
"Path": "/ref/spec"
55
}-->
66

@@ -3147,8 +3147,8 @@ <h4>Simple slice expressions</h4>
31473147

31483148
<p>
31493149
If the sliced operand of a valid slice expression is a <code>nil</code> slice, the result
3150-
is a <code>nil</code> slice. Otherwise, the result shares its underlying array with the
3151-
operand.
3150+
is a <code>nil</code> slice. Otherwise, if the result is a slice, it shares its underlying
3151+
array with the operand.
31523152
</p>
31533153

31543154
<h4>Full slice expressions</h4>

0 commit comments

Comments
 (0)