]> Cypherpunks repositories - gostls13.git/commit
Revert "encoding/json: don't reuse slice elements when decoding"
authorDaniel Martí <mvdan@mvdan.cc>
Wed, 1 Jul 2020 11:31:15 +0000 (11:31 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Thu, 2 Jul 2020 22:08:11 +0000 (22:08 +0000)
commit5de90d33c837af4d9a375a0a36811c7033655596
treed034eb8de25b4c60e5db4741b159462af655fe32
parenta4ba411b19fa0111a3c8fe059fcf5489d3bd6bbf
Revert "encoding/json: don't reuse slice elements when decoding"

This reverts https://golang.org/cl/191783.

Reason for revert: Broke too many programs which depended on the previous
behavior, even when it was the opposite of what the documentation said.

We can attempt to fix the original issue again for 1.16, while keeping
those programs in mind.

Fixes #39427.

Change-Id: I7a7f24b2a594c597ef625aeff04fff29aaa88fc6
Reviewed-on: https://go-review.googlesource.com/c/go/+/240657
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/encoding/json/decode.go
src/encoding/json/decode_test.go