encoding/gob: type information missing from nested ignored interfaces #34879
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I encoded a struct with multilevel nested interfaces, and then tried to ignore the encoded value when decoding.
https://play.golang.org/p/L0f2hXG46yx
What did you expect to see?
Decoding the stream to have been successful with type information from both nested interfaces received, while ignoring the first value.
What did you see instead?
gob: bad data: field numbers out of bounds
Also, the function
ignoreInterface
does not descend into its fields even if the concrete type name is registered. Without descending into the concrete type, it will not be able to get type information from any more interfaces nested inside the concrete type.go/src/encoding/gob/decode.go
Line 692 in 50bd1c4
The text was updated successfully, but these errors were encountered: