Thread overview
[Issue 16640] void fun(string file=__FILE_FULL_PATH__) returns relative path
Jan 06, 2017
Timothee Cour
Jan 09, 2017
Timothee Cour
Jan 09, 2017
Jonathan Marler
Jan 09, 2017
Timothee Cour
Jun 23, 2017
RazvanN
January 06, 2017
https://issues.dlang.org/show_bug.cgi?id=16640

Timothee Cour <timothee.cour2@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timothee.cour2@gmail.com
                 OS|Mac OS X                    |All

--- Comment #1 from Timothee Cour <timothee.cour2@gmail.com> ---
ping

--
January 09, 2017
https://issues.dlang.org/show_bug.cgi?id=16640

Timothee Cour <timothee.cour2@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johnnymarler@gmail.com

--- Comment #2 from Timothee Cour <timothee.cour2@gmail.com> ---

introduced here:
67d08406f7451954cd8caf5faea6a2a87244f8e7

by: Author: Jonathan Marler <johnnymarler@gmail.com>

--
January 09, 2017
https://issues.dlang.org/show_bug.cgi?id=16640

--- Comment #3 from Jonathan Marler <johnnymarler@gmail.com> ---
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.

--
January 09, 2017
https://issues.dlang.org/show_bug.cgi?id=16640

--- Comment #4 from Timothee Cour <timothee.cour2@gmail.com> ---
Just thought about introducing __DIR__ instead, see my post:

http://forum.dlang.org/post/mailman.1717.1483984089.9448.digitalmars-d@puremagic.com
__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!

--
June 23, 2017
https://issues.dlang.org/show_bug.cgi?id=16640

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #5 from RazvanN <razvan.nitu1305@gmail.com> ---
PR : https://github.com/dlang/dmd/pull/6928

--
July 02, 2017
https://issues.dlang.org/show_bug.cgi?id=16640

--- Comment #6 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/a9f5d61756ed83fb37eb88601dd9065db16c33bd Fix Issue 16640 - void fun(string file=__FILE_FULL_PATH__) returns relative path

https://github.com/dlang/dmd/commit/d7887fb8acc17f1d19fb0c23b4e7e4af371a6ee1 Merge pull request #6928 from RazvanN7/Issue_16640

Fix Issue 16640 - __FILE_FULL_PATH__ doesn't return relative path when used as
default parameter
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>

--
July 02, 2017
https://issues.dlang.org/show_bug.cgi?id=16640

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
August 07, 2017
https://issues.dlang.org/show_bug.cgi?id=16640

--- Comment #7 from github-bugzilla@puremagic.com ---
Commits pushed to newCTFE at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/a9f5d61756ed83fb37eb88601dd9065db16c33bd Fix Issue 16640 - void fun(string file=__FILE_FULL_PATH__) returns relative path

https://github.com/dlang/dmd/commit/d7887fb8acc17f1d19fb0c23b4e7e4af371a6ee1 Merge pull request #6928 from RazvanN7/Issue_16640

--
August 16, 2017
https://issues.dlang.org/show_bug.cgi?id=16640

--- Comment #8 from github-bugzilla@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/a9f5d61756ed83fb37eb88601dd9065db16c33bd Fix Issue 16640 - void fun(string file=__FILE_FULL_PATH__) returns relative path

https://github.com/dlang/dmd/commit/d7887fb8acc17f1d19fb0c23b4e7e4af371a6ee1 Merge pull request #6928 from RazvanN7/Issue_16640

--