compiler aborts with std.file.dirEntries

MIURA Masahiro miura at accense.com
Wed Jul 23 20:50:47 PDT 2008


Hi,

I got a DMD abort.

---- cut here ----
% cat dmdabort.d
import std.file;

string find_file(string directory)
{
    char[] result;
    foreach (string path; dirEntries(directory, SpanMode.shallow)) {
        string fullpath = std.file.join(directory, path);
        // ...
    }
    return cast(string)result;
}

void main(string[] args)
{
    // writefln("%s", find_file("."));
}
% dmd dmdabort.d
dmd: expression.c:5222: virtual Expression* DotIdExp::semantic(Scope*):
Assertion `0' failed.
zsh: abort      dmd dmdabort.d
%
---- cut here ----

Comment out the "string fullpath =" line and it compiles.
It's DMD 2.017 on Linux.  Any help please?


More information about the Digitalmars-d-learn mailing list