aboutsummaryrefslogtreecommitdiff
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
commite495351ff752bba2fcb20ff2d1448ae2b18e2300 (patch)
tree9b0aac50c9bec34b21a7f426ec025d58a6ff43a6
parent3ce29380d57a77496daec145b2a5510663d23901 (diff)
downloadgo-e495351ff752bba2fcb20ff2d1448ae2b18e2300.tar.gz
go-e495351ff752bba2fcb20ff2d1448ae2b18e2300.zip
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 https://golang.org/cl/1698043
-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 589d90458f..f296c2a38e 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>