mirror of
https://github.com/golang/go
synced 2024-11-22 06:54:39 -07:00
spec: address CL 5647054 comments
R=golang-dev, r CC=golang-dev https://golang.org/cl/5641057
This commit is contained in:
parent
596840a905
commit
7c5d6409f5
@ -897,9 +897,9 @@ struct {
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
A field declared with a type but no explicit field name is an <i>anonymous field</i>
|
A field declared with a type but no explicit field name is an <i>anonymous field</i>,
|
||||||
(colloquially called an embedded field).
|
also called an <i>embedded</i> field or an embedding of the type in the struct.
|
||||||
Such a field type must be specified as
|
An embedded type must be specified as
|
||||||
a type name <code>T</code> or as a pointer to a non-interface type name <code>*T</code>,
|
a type name <code>T</code> or as a pointer to a non-interface type name <code>*T</code>,
|
||||||
and <code>T</code> itself may not be
|
and <code>T</code> itself may not be
|
||||||
a pointer type. The unqualified type name acts as the field name.
|
a pointer type. The unqualified type name acts as the field name.
|
||||||
@ -1141,8 +1141,8 @@ type File interface {
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
An interface definition for type <code>T</code> may not embed itself,
|
An interface type <code>T</code> may not embed itself
|
||||||
nor any interface type that embeds <code>T</code> directly or indirectly.
|
or any interface type that embeds <code>T</code>, recursively.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
|
Loading…
Reference in New Issue
Block a user