Floating-point literals with leading zeroes incorrectly throw an octal digit error, as follows: writeln(07.0); // 7 writeln(08.0); // Error: octal digit expected, not `8` writeln(010.9); // 10.9 writeln(018.9); // Error: octal digit expected, not `8` writeln(00077777.0); // 77777 writeln(00077778.0); // Error: octal digit expected, not `8` The error is in lexer.d; errorDigit is set in number() in the initial switch case, but when a '.' is subsequently handled later in the function, the error state is never unset.
@aposteriorist created dlang/dmd pull request #13827 "Fix issue 22882 - Floating-point literals with leading zeroes incorrectly throw octal errors" fixing this issue: - Fix issue 22882: Floating-point leading zeroes bug This is a simple fix to issue #22882, though I'm sure something cleaner could be done. https://github.com/dlang/dmd/pull/13827
*** This issue has been marked as a duplicate of issue 22549 ***