string file = __FILE__ considered harmful (and solution)
Mike Franklin
slavo5150 at yahoo.com
Fri Jun 1 07:30:54 UTC 2018
On Friday, 1 June 2018 at 03:14:11 UTC, Walter Bright wrote:
> On 5/30/2018 2:45 PM, John Colvin wrote:
>> https://run.dlang.io/is/oMe7KQ
>>
>> Less elegant, but solves the problem of accidental argument
>> adding (CallerFile acts as a barrier). Unfortunately, while it
>> works in theory, in practice the compiler crashes.... LOL
>
> Please post bug reports when you find compiler crashes. Thanks!
It's the same issue as this
(https://issues.dlang.org/show_bug.cgi?id=18916) only for
__FILE__.
I already have a pending PR at
https://github.com/dlang/dmd/pull/8310 which I can modify to fix
for both __LINE__ and __FILE_ if I can get clarification on how
it *should* work.
Mike
More information about the Digitalmars-d
mailing list