]> Cypherpunks repositories - gostls13.git/commit
encoding/gob: improve interface assignment error message
authorKelsey Hightower <kelsey.hightower@gmail.com>
Wed, 5 Mar 2014 19:52:18 +0000 (06:52 +1100)
committerRob Pike <r@golang.org>
Wed, 5 Mar 2014 19:52:18 +0000 (06:52 +1100)
commit13e359bdca44f204cbeb3368a0ba44c3bc92d55d
tree46343443937a912502ecd38a7788fa5c077ca75b
parent58980821c7f8f5412da418365b717eeef4078846
encoding/gob: improve interface assignment error message

During the glob decoding process interface values are set to concrete
values after a test for assignability. If the assignability test fails
a slightly vague error message is produced. While technically accurate
the error message does not clearly describe the problem.

Rewrite the error message to include the usage of the word assignable,
which makes it clear the concrete value type is not assignable to the
interface value type.

Fixes #6467.

LGTM=r
R=golang-codereviews, rsc, r
CC=golang-codereviews
https://golang.org/cl/71590043
src/pkg/encoding/gob/decode.go