]> Cypherpunks repositories - gostls13.git/commit
encoding/gob: fix mutually recursive slices of structs
authorRob Pike <r@golang.org>
Sat, 18 Feb 2012 01:43:08 +0000 (12:43 +1100)
committerRob Pike <r@golang.org>
Sat, 18 Feb 2012 01:43:08 +0000 (12:43 +1100)
commit793f6f3cc3c2e6a5fc6636f984eadb808c7b62e8
treee1ccbd7bb760af375f8a42c4de02beb307e74d20
parent3e804f98d75515bba73a86f563257eabceb1afe1
encoding/gob: fix mutually recursive slices of structs

Fix by setting the element type if we discover it's zero while building.
We could have fixed this better with foresight by doing the id setting in a
different sequence, but doing that now would break binary compatibility.

Fixes #2995.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5675083
src/pkg/encoding/gob/encoder_test.go
src/pkg/encoding/gob/type.go