You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reported by taru karttunen. this program fails.
i know the bug, the fix will take some thinking. putting it here to track.
package main
import "gob"
import "bytes"
type F struct {
Contents
}
type Contents interface {}
type T struct {}
func main() {
var buf bytes.Buffer
e := gob.NewEncoder(&buf)
d := gob.NewDecoder(&buf)
gob.Register(new(F))
gob.Register(new(T))
f := &F{&T{}}
var v interface{} = f
err := e.Encode(&v)
if err!=nil { panic("Encode: "+err.String()) }
err = d.Decode(&v)
if err!=nil { panic("Decode: "+err.String()) }
}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: