My code (test.d):
=======
void main()
{
    import std.path: buildPath;
    pragma(msg, import("file"));
    pragma(msg, import(buildPath(".", "file")));
}
=======

Content of file "file" is one line with "hello" text.

Running command: dmd -J. -run test.d

Result on Ubuntu:
=======
hello

hello

=======

Result on Windows:
=======
hello

test.d(46): Error: file ".\\file" cannot be found or not in a path specified with -J test.d(46): while evaluating pragma(msg, import(buildPath([".", "file"][])))
=======

Is this a bug in dmd?

Reply via email to