summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2010-04-01 12:48:34 -0700
committerRobert Griesemer <gri@golang.org>2010-04-01 12:48:34 -0700
commit2c9e1806123a6f7d690c8d441dc791f995836e0c (patch)
treec517fdad2cae7c63486fa88b7b177beae6030708 /doc
parent69761139d350ba97ffcccb8f4cba08f723dc2b05 (diff)
downloadgolang-2c9e1806123a6f7d690c8d441dc791f995836e0c.tar.gz
go spec: correct clarification of type declaration
R=rsc, r CC=golang-dev http://codereview.appspot.com/855043 Committer: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/go_spec.html9
1 files changed, 3 insertions, 6 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html
index 4a4fa5023..d34653f26 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -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, the new type is
+an existing type. The 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 unchanged:
</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>