summaryrefslogtreecommitdiff
path: root/doc/go_spec.html
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-06-21 12:42:33 -0700
committerRuss Cox <rsc@golang.org>2010-06-21 12:42:33 -0700
commitf81fce331b39e659f86ef190c83c1e30c00f5b74 (patch)
tree5307a0ce6bb49fd4824a555387cb827dde4f53fd /doc/go_spec.html
parent0bc8c500dc33ead925d71d1c1a4e87a38913f903 (diff)
downloadgolang-f81fce331b39e659f86ef190c83c1e30c00f5b74.tar.gz
spec: struct tags must be identical for types to be identical
We didn't mention this explicitly during our discussions, but I think it fits the "identical types are spelled identically" rule that we used. R=gri, iant, ken2, r, rsc1 CC=golang-dev http://codereview.appspot.com/1698043
Diffstat (limited to 'doc/go_spec.html')
-rw-r--r--doc/go_spec.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html
index 589d90458..f296c2a38 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1263,7 +1263,8 @@ literal structure and corresponding components have identical types. In detail:
<li>Two slice types are identical if they have identical element types.</li>
<li>Two struct types are identical if they have the same sequence of fields,
- and if corresponding fields have the same names and identical types.
+ and if corresponding fields have the same names, and identical types,
+ and identical tags.
Two anonymous fields are considered to have the same name. Lower-case field
names from different packages are always different.</li>