aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/encode.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2024-09-30 15:55:14 -0700
committerGopher Robot <gobot@golang.org>2024-10-02 00:57:58 +0000
commitaa42d7b402ac163ebce141c2805eaf3558252606 (patch)
tree68b6098b1bae75f06cfb53bb8df69caba15ceef9 /src/encoding/json/encode.go
parent8c52cd3da550f5315c32bdcb9442ac50e3e4ec96 (diff)
downloadgo-aa42d7b402ac163ebce141c2805eaf3558252606.tar.xz
spec: clarify that identical structs must have identical field embeddings
The existing prose for struct identity did only require that two structs "have the same sequence of fields, and if corresponding fields have the same names, and identical types, and identical tags" for the structs to be identical. The implementation (forever) has also required that two corresponding fields are either both embedded or not embedded. This is arguably part of a struct's structure but is not explicitly specified. This CL makes a minor change to the prose to address that. Fixes #69472. Change-Id: Ifa4ca69717986675642a09d03ce683ba8235efcb Reviewed-on: https://go-review.googlesource.com/c/go/+/616697 Reviewed-by: Rob Pike <r@golang.org> TryBot-Bypass: Robert Griesemer <gri@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com>
Diffstat (limited to 'src/encoding/json/encode.go')
0 files changed, 0 insertions, 0 deletions