]> Cypherpunks repositories - gostls13.git/commitdiff
go spec clarification: arrays must be addressable to be sliceable
authorRobert Griesemer <gri@golang.org>
Thu, 2 Sep 2010 17:16:31 +0000 (10:16 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 2 Sep 2010 17:16:31 +0000 (10:16 -0700)
R=rsc
CC=golang-dev, r
https://golang.org/cl/2141041

doc/go_spec.html

index 861c858be14f1b09ccb2e72f8ed3aad8b3841ca2..b23ef7606b901a0ad0ad9d90ebf1ff45929b5733 100644 (file)
@@ -1,5 +1,5 @@
 <!-- title The Go Programming Language Specification -->
-<!-- subtitle Version of Sep 1, 2010 -->
+<!-- subtitle Version of Sep 2, 2010 -->
 
 <!--
 TODO
@@ -2464,8 +2464,8 @@ for slices, the upper bound is the capacity rather than the length.
 <p>
 If the sliced operand is a string or slice, the result of the slice operation
 is a string or slice of the same type.
-If the sliced operand is an array, the result of the slice operation is a slice
-with the same element type as the array.
+If the sliced operand is an array, it must be <a href="#Address_operators">addressable</a>
+and the result of the slice operation is a slice with the same element type as the array.
 </p>