Comment #0 by timothee.cour2 — 2018-01-28T08:03:13Z
this is reminiscent of https://issues.dlang.org/show_bug.cgi?id=16640 but different, and in fact worse since it returns a wrong relative path
dmd -Ifoo4 -run main.d
foo4/main.d #BUG: relative path pointing to nowhere
/path/to/main.d #OK: absolute path
files:
main.d
foo4/util.d
```
// main.d:
module main;
import util;
void main(){fun;}
// foo4/main.d:
module util;
void fun(string file1=__FILE_FULL_PATH__)(string file2=__FILE_FULL_PATH__){
import std.stdio;
writeln(file1); // BUG:relative path
writeln(file2); // OK
}
```
NOTE: calling it a regression because dmd 2.075 also returned a relative path instead of absolute (which is wrong) but at least the relative path it returned was correct instead of pointing to nowhere
dlang/dmd pull request #12093 "[dmd-cxx] Backport more recent traits to the C++ port" was merged into dmd-cxx:
- 689820db99a7ce0d551d78639f2558c2d4d9cc95 by Jonathan Marler:
[dmd-cxx] Fix issue 18322
https://github.com/dlang/dmd/pull/12093