Closed msoeken closed 5 years ago
Describe the bug
The smallest possible int64 value -9223372036854775808 cannot be parsed into a Q# Int type.
-9223372036854775808
Int
To Reproduce
A test case to trigger the bug is described in this branch:
https://github.com/msoeken/qsharp-compiler/blob/msoeken/minint-bug/src/QsCompiler/Tests.Compiler/SyntaxTests.fs#L171
Expected behavior
The parser returns an Int value with the smallest integer value.
System information
Reproduced on master, other system information seems to be irrelevant for this bug.
Additional context
Maybe the sign is parsed separate from the int value, since the largest int64 value is 9223372036854775807.
Hehe, yes, indeed, I parse the sign separately... That's one edge case to overlook. Thanks for pointing it out!
Describe the bug
The smallest possible int64 value
-9223372036854775808
cannot be parsed into a Q#Int
type.To Reproduce
A test case to trigger the bug is described in this branch:
https://github.com/msoeken/qsharp-compiler/blob/msoeken/minint-bug/src/QsCompiler/Tests.Compiler/SyntaxTests.fs#L171
Expected behavior
The parser returns an
Int
value with the smallest integer value.System information
Reproduced on master, other system information seems to be irrelevant for this bug.
Additional context
Maybe the sign is parsed separate from the int value, since the largest int64 value is 9223372036854775807.