diff options
Diffstat (limited to 'libgo/go/encoding/gob/encoder_test.go')
-rw-r--r-- | libgo/go/encoding/gob/encoder_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libgo/go/encoding/gob/encoder_test.go b/libgo/go/encoding/gob/encoder_test.go index cd1500d0772..7a30f9107e6 100644 --- a/libgo/go/encoding/gob/encoder_test.go +++ b/libgo/go/encoding/gob/encoder_test.go @@ -678,3 +678,11 @@ func TestUnexportedChan(t *testing.T) { t.Fatalf("error encoding unexported channel: %s", err) } } + +func TestSliceIncompatibility(t *testing.T) { + var in = []byte{1, 2, 3} + var out []int + if err := encAndDec(in, &out); err == nil { + t.Error("expected compatibility error") + } +} |