]> Cypherpunks repositories - gostls13.git/commitdiff
go spec: Disallow &a notation to obtain a slice
authorRobert Griesemer <gri@golang.org>
Fri, 28 May 2010 00:23:25 +0000 (17:23 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 28 May 2010 00:23:25 +0000 (17:23 -0700)
from an array; one needs to write a[0:] instead.

R=rsc, r, iant, ken2
CC=golang-dev
https://golang.org/cl/1365041

doc/go_spec.html

index aad1f34dd6e0e73a83dd1f34d8ddd1611b8ce7bc..d5b4af698b39f30abc62eb62d7de84f9a2d75562 100644 (file)
@@ -1,5 +1,5 @@
 <!-- title The Go Programming Language Specification -->
-<!-- subtitle Version of May 24, 2010 -->
+<!-- subtitle Version of May 26, 2010 -->
 
 <!--
 Todo
@@ -1344,12 +1344,6 @@ with a type <code>T</code> if one or more of the following conditions applies:
 <code>V</code> <a href="#Interface_types">implements</a> <code>T</code>.
 </li>
 <li>
-<code>V</code> is a pointer to an array and <code>T</code> is a slice type
-with compatible element type and at least one of <code>V</code> or <code>T</code> is unnamed.
-After assignment, the slice variable refers to the original array; the elements are not
-copied.
-</li>
-<li>
 <code>V</code> is a bidirectional channel and <code>T</code> is a channel type
 with compatible element type and at least one of <code>V</code> or <code>T</code> is unnamed.
 </li>