mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
The String() method requires global state that makes it not work outside of this package,
so make it a local method (_String()). R=rsc CC=golang-dev https://golang.org/cl/165049
This commit is contained in:
parent
fcc4dd6d64
commit
10a349a7c1
3 changed files with 17 additions and 17 deletions
|
|
@ -611,7 +611,7 @@ func (dec *Decoder) decIgnoreOpFor(wireId typeId) (decOp, os.Error) {
|
|||
}
|
||||
}
|
||||
if op == nil {
|
||||
return nil, os.ErrorString("ignore can't handle type " + wireId.String())
|
||||
return nil, os.ErrorString("ignore can't handle type " + wireId.string())
|
||||
}
|
||||
return op, nil;
|
||||
}
|
||||
|
|
@ -718,7 +718,7 @@ func (dec *Decoder) compileDec(remoteId typeId, rt reflect.Type) (engine *decEng
|
|||
continue;
|
||||
}
|
||||
if !dec.compatibleType(localField.Type, wireField.id) {
|
||||
details := " (" + wireField.id.String() + " incompatible with " + localField.Type.String() + ") in type " + remoteId.Name();
|
||||
details := " (" + wireField.id.string() + " incompatible with " + localField.Type.String() + ") in type " + remoteId.Name();
|
||||
return nil, os.ErrorString("gob: wrong type for field " + wireField.name + details);
|
||||
}
|
||||
op, indir, err := dec.decOpFor(wireField.id, localField.Type, localField.Name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue