Skip to content

Commit

Permalink
Merge pull request #293 from jrisc/explicit_int64
Browse files Browse the repository at this point in the history
Fix large literals type inference on 32 bits
  • Loading branch information
goccy committed Aug 22, 2022
2 parents 03bdafe + 66e8faa commit ecececd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions decode_test.go
Expand Up @@ -89,7 +89,7 @@ func TestDecoder(t *testing.T) {
},
{
"v: -0b1000000000000000000000000000000000000000000000000000000000000000",
map[string]interface{}{"v": -9223372036854775808},
map[string]interface{}{"v": int64(-9223372036854775808)},
},
{
"v: 0xA",
Expand All @@ -109,7 +109,7 @@ func TestDecoder(t *testing.T) {
},
{
"v: 4294967296\n",
map[string]int{"v": 4294967296},
map[string]int64{"v": int64(4294967296)},
},
{
"v: 0.1\n",
Expand Down Expand Up @@ -200,7 +200,7 @@ func TestDecoder(t *testing.T) {
map[string]uint{"v": 42},
}, {
"v: 4294967296",
map[string]uint64{"v": 4294967296},
map[string]uint64{"v": uint64(4294967296)},
},

// int
Expand Down
2 changes: 1 addition & 1 deletion encode_test.go
Expand Up @@ -65,7 +65,7 @@ func TestEncoder(t *testing.T) {
},
{
"v: 4294967296\n",
map[string]int{"v": 4294967296},
map[string]int64{"v": int64(4294967296)},
nil,
},
{
Expand Down

0 comments on commit ecececd

Please sign in to comment.