Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
7c5d6409
Commit
7c5d6409
authored
Feb 08, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spec: address CL 5647054 comments
R=golang-dev, r CC=golang-dev
https://golang.org/cl/5641057
parent
596840a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
go_spec.html
doc/go_spec.html
+5
-5
No files found.
doc/go_spec.html
View file @
7c5d6409
...
@@ -897,9 +897,9 @@ struct {
...
@@ -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 fiel
d type must be specified as
An embedde
d 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 {
...
@@ -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 indirect
ly.
or any interface type that embeds
<code>
T
</code>
, recursive
ly.
</p>
</p>
<pre>
<pre>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment