summaryrefslogtreecommitdiff
path: root/test/files/run/number-parsing.scala
Commit message (Collapse)AuthorAgeFilesLines
* Don't use `equals` for comparing java.lang.Double/FloatLukas Rytz2017-03-091-2/+2
| | | | | | | Fixes https://github.com/scala/scala-dev/issues/329 The `equals` method for java.lang.Double/Float behaves differently than comparing the `doubleValue`s / `floatValues` for `-0.0`/`0.0`/`NaN`.
* Cull extraneous whitespace.Paul Phillips2013-09-181-2/+2
| | | | | | | | | | | | | | | | | | | | | One last flurry with the broom before I leave you slobs to code in your own filth. Eliminated all the trailing whitespace I could manage, with special prejudice reserved for the test cases which depended on the preservation of trailing whitespace. Was reminded I cannot figure out how to eliminate the trailing space on the "scala> " prompt in repl transcripts. At least reduced the number of such empty prompts by trimming transcript code on the way in. Routed ConsoleReporter's "printMessage" through a trailing whitespace stripping method which might help futureproof against the future of whitespace diseases. Deleted the up-to-40 lines of trailing whitespace found in various library files. It seems like only yesterday we performed whitespace surgery on the whole repo. Clearly it doesn't stick very well. I suggest it would work better to enforce a few requirements on the way in.
* Begone t1737...Hubert Plociniczak2011-11-021-2/+2
|
* Restoring negative literal parsing behavior to ...Paul Phillips2010-09-171-0/+31
Restoring negative literal parsing behavior to what should be the least surprising option. Thanks much to Johannes Rudolph for identifying the bug in the bytecode generator which needed addressing for us to arrive at proper -0.0 behavior, and for writing the majority of this patch. A '-' followed immediately by either a number or a period should now always be treated as a single numeric literal, which means the minus binds more tightly than anything else. A specific example of how this differs from 2.8 final is: -5.+(10) == 5.0 // and not -15.0 The full range of potentially ambiguous parses involving prefix operators, numbers, and dots is quite large and still needs to be completely and clearly specified. Closes #2378 and #3657, review by odersky, jrudolph.