Bug in import(...) on Windows?
Andrey Zherikov
andrey.zherikov at gmail.com
Wed Sep 2 17:39:04 UTC 2020
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?
More information about the Digitalmars-d-learn
mailing list