mirror of
https://github.com/go-delve/delve.git
synced 2025-10-28 20:53:42 +08:00
proc: fix result type of division of untyped constants (#3794)
The Go specification says that the result of division of untyped constants should be an untyped integer constant if both constants are untyped integers, the go/constant package however does something different by always producing an untyped floating constant. Fixes #3793
This commit is contained in:
committed by
GitHub
parent
c2dc6edcfc
commit
a63cc8a1a3
@ -718,6 +718,8 @@ func getEvalExpressionTestCases() []varTest {
|
||||
{"1 + 2i", false, "(1 + 2i)", "(1 + 2i)", "", nil},
|
||||
{"true", false, "true", "true", "", nil},
|
||||
{"\"test\"", false, "\"test\"", "\"test\"", "", nil},
|
||||
{"1/2", false, "0", "0", "", nil},
|
||||
{"zeropoint4 > 1/2", false, "true", "true", "", nil},
|
||||
|
||||
// binary operators
|
||||
{"i2 + i3", false, "5", "5", "int", nil},
|
||||
|
||||
Reference in New Issue
Block a user