summaryrefslogtreecommitdiff
path: root/src/pkg/encoding/gob/encoder.go
diff options
context:
space:
mode:
authorKyle Lemons <kyle@kylelemons.net>2013-01-14 16:07:11 +1100
committerKyle Lemons <kyle@kylelemons.net>2013-01-14 16:07:11 +1100
commit85924f6ee4dcb075fb687661d2ba729f65de5836 (patch)
tree706746f4dcaab0ffefa87102845ef23b84b36ffc /src/pkg/encoding/gob/encoder.go
parent7172cf556d871f2741667daafee77311220c2128 (diff)
downloadgo-85924f6ee4dcb075fb687661d2ba729f65de5836.tar.gz
encoding/gob: handle encoding of different indirects of GobEncoder
Fixes issue 4647. R=r, golang-dev CC=golang-dev https://codereview.appspot.com/7085051 Committer: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'src/pkg/encoding/gob/encoder.go')
-rw-r--r--src/pkg/encoding/gob/encoder.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/encoding/gob/encoder.go b/src/pkg/encoding/gob/encoder.go
index 284decede..f669c3d5b 100644
--- a/src/pkg/encoding/gob/encoder.go
+++ b/src/pkg/encoding/gob/encoder.go
@@ -137,8 +137,8 @@ func (enc *Encoder) sendType(w io.Writer, state *encoderState, origt reflect.Typ
ut := userType(origt)
if ut.isGobEncoder {
// The rules are different: regardless of the underlying type's representation,
- // we need to tell the other side that this exact type is a GobEncoder.
- return enc.sendActualType(w, state, ut, ut.user)
+ // we need to tell the other side that the base type is a GobEncoder.
+ return enc.sendActualType(w, state, ut, ut.base)
}
// It's a concrete value, so drill down to the base type.