math/big: UnmarshalText <nil>
to *big.Float, *big.Int, *big.Rat caused panic
#51498
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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?
MarshalText
<nil>
to *big.Float, *big.Int, *big.Rat nil pointers withUnmarshalText
For example:
https://go.dev/play/p/oViLT_0fgBu
What did you expect to see?
Encoding *big.Rat nil pointer will return text
<nil>
<nil>
Unmarshal text
<nil>
to *big.Float, *big.Int, *big.Rat nil pointers withUnmarshalText
not panic<nil>
should also work fine, not panic.What did you see instead?
panic like this:
MarshalText
<nil>
to *big.Float nil pointer withUnmarshalText
The text was updated successfully, but these errors were encountered: