summaryrefslogtreecommitdiff
path: root/test/files/neg/literals.check
Commit message (Collapse)AuthorAgeFilesLines
* SI-10148 Follow Java for float literalsSom Snytt2017-01-181-1/+13
| | | | | Use `Float.parseFloat` instead of converting from Double. Error when a value rounds to zero.
* SI-9015 Reject 0x and minor parser cleanupSom Snytt2014-12-051-0/+40
Only print error results. Show deprecated forms. Test for rejected literals and clean up parser There was no negative test for what constitutes a legal literal. The ultimate goal is for the test to report all errors in one compilation. This commit follows up the removal of "1." syntax to simplify number parsing. It removes previous paulp code to contain the erstwhile complexity. Leading zero is not immediately put to the buffer. Instead, the empty buffer is handled on evaluation. In particular, an empty buffer due to `0x` is a syntax error. The message for obsolete octal syntax is nuanced and deferred until evaluation by the parser, which is slightly simpler to reason about. Improve comment on usage of base The slice-and-dicey usage of base deserves a better comment. The difference is that `intVal` sees an empty char buffer for input `"0"`.