]> Cypherpunks repositories - gostls13.git/commitdiff
spec: struct tags must be identical for types to be identical
authorRuss Cox <rsc@golang.org>
Mon, 21 Jun 2010 19:42:33 +0000 (12:42 -0700)
committerRuss Cox <rsc@golang.org>
Mon, 21 Jun 2010 19:42:33 +0000 (12:42 -0700)
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

doc/go_spec.html

index 589d90458f8527aadde83cd280363d850986dade..f296c2a38ec3f9e33da9d65a0590651f6c1f8542 100644 (file)
@@ -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>