Comment #1 by timothee.cour2 — 2017-01-06T21:16:24Z
ping
Comment #2 by timothee.cour2 — 2017-01-09T08:48:39Z
introduced here:
67d08406f7451954cd8caf5faea6a2a87244f8e7
by: Author: Jonathan Marler <[email protected]>
Comment #3 by johnnymarler — 2017-01-09T16:52:57Z
The __FILE_FULL_PATH__ macro is a feature that I added to the DMD compiler in the commit you referenced (67d08406f7451954cd8caf5faea6a2a87244f8e7). I never tested using it as a default argument to a function parameter so it looks like you've found a bug. You are welcome to fix this. If you decide to fix it, I would also add a unit test. The original unit test I added for this feature is in <dmd>/test/compilable/line.d, it may or may not be the correct place for the new unit test, but it should definitely be added somewhere. Maybe a test like this:
void testFileFullPathAsDefaultArgument(string preBakedFileFullPath, string fileFullPath = __FILE_FULL_PATH__)
{
assert(preBakedFileFullPath == fileFullPath);
}
testFileFullPathAsDefaultArgument(__FILE_FULL_PATH__);
Let me know if you have any questions.
P.S. Just out of curiosity, what were you using this macro for? I spent alot of time convincing the D maintainers that it was a useful feature so I'm curious what uses people have found for it.
Comment #4 by timothee.cour2 — 2017-01-09T17:50:29Z
Just thought about introducing __DIR__ instead, see my post:
http://forum.dlang.org/post/[email protected]
__DIR__ trait (return getcwd at compile time), replacing __FILE_FULL_PATH__
[maybe reply in that post if you have some opinion on __DIR__ proposal]
Thanks!
Comment #5 by razvan.nitu1305 — 2017-06-23T13:13:08Z