https://issues.dlang.org/show_bug.cgi?id=15293

--- Comment #3 from HeiHon <[email protected]> ---
Thanks for this reduction!
It also crashes with:

static import std.file;
import std.stdio: File, writeln;
import std.string: toUpper, toLower;

void main()
{
    std.file.write("gen.txt", "12345678\n1234567\n12345678a");
    foreach(ln; File("gen.txt").byLine())
    {
        writeln(ln);
        writeln("> ", toLower(ln));
    }
    foreach(ln; File("gen.txt").byLine())
    {
        writeln(ln);
        writeln("> ", toUpper(ln));
    }
}

If the last character is lowercase then toUpper crashes.
If it is uppercase then toLower crashes.

--

Reply via email to