Bug in import(...) on Windows?

Andrey Zherikov andrey.zherikov at gmail.com
Wed Sep 2 20:48:17 UTC 2020


On Wednesday, 2 September 2020 at 20:23:15 UTC, Steven 
Schveighoffer wrote:
> What I'm wondering is if it needs to be ./file instead of 
> .\file. Can you hard code that and see if it works?

This actually works:
     pragma(msg, import("file"));
     pragma(msg, buildPath(".", "file"));
     pragma(msg, import("./file"));

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

./file
hello

=======

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

.\file
hello

=======

This seems weird that I can't use std.path functions or use valid 
"foo\bar" paths on Windows.


More information about the Digitalmars-d-learn mailing list