Bug 17848 – Example of floating point literals in the documentation is invalid
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-09-22T12:45:30Z
Last change time
2017-10-16T09:57:39Z
Keywords
pull, spec
Assigned to
ag0aep6g
Creator
Peter Varo
Comments
Comment #0 by hello — 2017-09-22T12:45:30Z
The documentation about the 'Floating Point Literals' (https://dlang.org/spec/lex.html#floatliteral) is not mentioning any kind of 'd' suffix for float literals, yet in the examples it is showing as both good and bad ones:
the good: https://github.com/dlang/dlang.org/blob/master/spec/lex.dd#L918
the bad: https://github.com/dlang/dlang.org/blob/master/spec/lex.dd#L919
So further actions are required:
- If the 'd' suffix should be supported, then it needs further explanation and at the same time, the compiler should accept it as valid float literal. (Which I believe is not a valid one, hence currently dmd is complaining about it.)
- If the 'd' suffix is as invalid float literal, then it should be removed from the examples.