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
d4a16197
Commit
d4a16197
authored
Apr 01, 2010
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go spec: correct clarification of type declaration
R=rsc, r CC=golang-dev
https://golang.org/cl/855043
parent
ec53627e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
go_spec.html
doc/go_spec.html
+3
-6
No files found.
doc/go_spec.html
View file @
d4a16197
...
...
@@ -1704,11 +1704,9 @@ last non-empty expression list.
<p>
A type declaration binds an identifier, the
<i>
type name
</i>
, to a new type
that has the same definition (element, fields, channel direction, etc.) as
an existing type.
With the exception of interface types, t
he new type is
an existing type.
T
he new type is
<a
href=
"#Properties_of_types_and_values"
>
compatible
</a>
with, but
<a
href=
"#Properties_of_types_and_values"
>
different
</a>
from, the existing type.
A newly defined interface type is always
<a
href=
"#Properties_of_types_and_values"
>
identical
</a>
to the existing type.
</p>
<pre
class=
"ebnf"
>
...
...
@@ -1739,7 +1737,7 @@ type Cipher interface {
<p>
The declared type does not inherit any
<a
href=
"#Method_declarations"
>
methods
</a>
bound to the existing type, but the
<a
href=
"#Types"
>
method set
</a>
of
elements of a composite type or of an interface type is not
changed:
of
an interface type or of elements of a composite type remains un
changed:
</p>
<pre>
...
...
@@ -1757,8 +1755,7 @@ type PrintableMutex struct {
Mutex
}
// MyCipher is an interface type that has the same method set as Cipher;
// it is indistinguishable from Cipher.
// MyCipher is an interface type that has the same method set as Cipher.
type MyCipher Cipher
</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