dlang / ddox

Advanced D documentation engine
MIT License
63 stars 21 forks source link

Strange variable definition for std.ascii.newline #205

Open Herringway opened 6 years ago

Herringway commented 6 years ago

Currently, the definition of std.ascii.newline has some strange issues. The POSIX version is duplicated, while the windows version is wrongly typed as void.

In case something changes, the current definition is displayed as:

immutable(char[]) newline = "\x0a";
immutable(char[]) newline = "\x0a";
void newline = "\x0d\x0a";

while the code for std.ascii.newline is:

/// Newline sequence for this system.
version(Windows)
    immutable newline = "\r\n";
else version(Posix)
    immutable newline = "\n";
else
    static assert(0, "Unsupported OS");