Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange variable definition for std.ascii.newline #205

Open
Herringway opened this issue Apr 22, 2018 · 0 comments
Open

Strange variable definition for std.ascii.newline #205

Herringway opened this issue Apr 22, 2018 · 0 comments

Comments

@Herringway
Copy link

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");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant