1
0
mirror of https://github.com/golang/go synced 2024-11-21 14:14:40 -07:00

go spec: Disallow &a notation to obtain a slice

from an array; one needs to write a[0:] instead.

R=rsc, r, iant, ken2
CC=golang-dev
https://golang.org/cl/1365041
This commit is contained in:
Robert Griesemer 2010-05-27 17:23:25 -07:00
parent 1fda1323d4
commit 31f2503cde

View 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>