mirror of
https://github.com/golang/go
synced 2024-11-25 05:57:57 -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:
parent
1fda1323d4
commit
31f2503cde
@ -1,5 +1,5 @@
|
|||||||
<!-- title The Go Programming Language Specification -->
|
<!-- title The Go Programming Language Specification -->
|
||||||
<!-- subtitle Version of May 24, 2010 -->
|
<!-- subtitle Version of May 26, 2010 -->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Todo
|
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>.
|
<code>V</code> <a href="#Interface_types">implements</a> <code>T</code>.
|
||||||
</li>
|
</li>
|
||||||
<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
|
<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.
|
with compatible element type and at least one of <code>V</code> or <code>T</code> is unnamed.
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user