You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect the copy result to be one less than Current after increment.
11 // Current value after increment.
10 // Copy of current value before increment.
12 // Current value after increment.
11 // Copy of current value before increment.
Program exited.
OR
I expect the value of the returned value to always be equal to current (even after increment).
11 // Current value after increment.
11 // Copy of current value before increment.
12 // Current value after increment.
12 // Copy of current value before increment.
Program exited.
What did you see instead?
In the first execution it has a behavior and from the first execution the behavior changes.
11 // Current value after increment.
10 // Copy of current value before increment.
12 // Current value after increment.
12 // Copy of current value before increment.
Program exited.
The text was updated successfully, but these errors were encountered:
A big.Int is not meant to be copied shallowly like that. See https://pkg.go.dev/math/big#Int , second paragraph.
Generally you never want a big.Int, only *big.Int.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
For example: https://go.dev/play/p/t0Tw1oDgxIh
What did you expect to see?
I expect the copy result to be one less than Current after increment.
OR
I expect the value of the returned value to always be equal to current (even after increment).
What did you see instead?
In the first execution it has a behavior and from the first execution the behavior changes.
The text was updated successfully, but these errors were encountered: