dolphinsmalltalk / Dolphin

Dolphin Smalltalk Core Image
MIT License
294 stars 58 forks source link

SmalltalkScanner loses sign of simple negative floats #1262

Closed blairmcg closed 6 months ago

blairmcg commented 6 months ago

The SmalltalkScanner used for refactorings, live error reporting and some other IDE purposes, loses the sign of simple negative floats. This hasn't mattered much to date because the literal values generated are not consumed, e.g. when an AST is used to reformat code, the original number syntax is preserved.

The bug was introduced in 9dd28bdf5bc5581380b5daf99b39b34d6c7796bb

To Reproduce

Evaluate:

(SmalltalkScanner on: '-1.23' readStream) next value "=> 1.23"

Expected behavior Obviously the result should be -1.23.

blairmcg commented 6 months ago

Fixed by e4d979c3239e4b169edf575b4b712b7fb4828a3b in master and de5e3381af0ea82c6f6c7f9bd7e40723a816aba3 in release/7.1