-
Keith Randall authored
Make sure that when we're assigning to a map, we evaluate the right-hand side before we attempt to insert into the map. We used to evaluate the left-hand side to a pointer-to-slot-in-bucket (which as a side effect does len(m)++), then evaluate the right-hand side, then do the assignment. That clearly isn't correct when the right-hand side might panic. Fixes #22881 Change-Id: I42a62870ff4bf480568c9bdbf0bb18958962bdf0 Reviewed-on: https://go-review.googlesource.com/81817Reviewed-by: Matthew Dempsky <mdempsky@google.com>
dd7cbf3a
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
internal | ||
doc.go | ||
fmt_test.go | ||
main.go |