mirror of
https://github.com/go-delve/delve.git
synced 2025-11-01 20:20:40 +08:00
proc: correctly truncate the result of binary ops on integers (#2463)
Truncates the result of binary operations on integers to the size of the resulting type. Also rewrites convertInt to not require allocations. Fixes #2454
This commit is contained in:
committed by
GitHub
parent
db291698e0
commit
32946b2d7c
@ -836,6 +836,10 @@ func TestEvalExpression(t *testing.T) {
|
||||
{`iface2map.(data)`, false, "…", "…", "map[string]interface {}", nil},
|
||||
|
||||
{"issue1578", false, "main.Block {cache: *main.Cache nil}", "main.Block {cache: *main.Cache nil}", "main.Block", nil},
|
||||
{"ni8 << 2", false, "-20", "-20", "int8", nil},
|
||||
{"ni8 << 8", false, "0", "0", "int8", nil},
|
||||
{"ni8 >> 1", false, "-3", "-3", "int8", nil},
|
||||
{"bytearray[0] * bytearray[0]", false, "144", "144", "uint8", nil},
|
||||
}
|
||||
|
||||
ver, _ := goversion.Parse(runtime.Version())
|
||||
|
||||
Reference in New Issue
Block a user