summaryrefslogtreecommitdiff
path: root/Source/Dafny/BigIntegerParser.cs
Commit message (Collapse)AuthorAge
* Fix a bug spotted by Chris in my BigInteger patch; thanks!Gravatar Clément Pit--Claudel2015-06-12
| | | | | | | | | | | The problem was this: Console.WriteLine(Int64.Parse("08000000000000000", NumberStyles.HexNumber)); // => -9223372036854775808 Console.WriteLine(Int64.Parse("9223372036854775808")); // => Value was either too large or too small for an Int64. In other words, large hex numbers are interpreted as a sequence of bits, not as an actual number.
* Add a compatibility layer over BigInteger.ParseGravatar Clément Pit--Claudel2015-06-07
Mono currently does not implement support for BigInteger.Parse, so use Int64 if possible, and throw the same error as was previously returned otherwise. This is not too much of a problem in practice, because most of the integers that we actually come across in real-life source files seem to fit in an Int64.