various: avoid func compare

R=gri, r, bradfitz
CC=golang-dev
https://golang.org/cl/5371074
This commit is contained in:
Russ Cox 2011-11-13 22:57:19 -05:00
parent c017a8299f
commit 558e7fc332
9 changed files with 136 additions and 107 deletions

View file

@ -227,7 +227,7 @@ func (d *decodeState) value(v reflect.Value) {
// d.scan thinks we're still at the beginning of the item.
// Feed in an empty string - the shortest, simplest value -
// so that it knows we got to the end of the value.
if d.scan.step == stateRedo {
if d.scan.redo {
panic("redo")
}
d.scan.step(&d.scan, '"')