Thread overview
[Issue 18919] __FILE__ and __LINE__ should work when used in default argument expressions
Jul 24, 2020
Mathias LANG
Feb 05, 2021
Dennis
Dec 17, 2022
Iain Buclaw
May 23, 2023
Adam D. Ruppe
Dec 30
Dlang Bot
Jan 07
Dlang Bot
July 24, 2020
https://issues.dlang.org/show_bug.cgi?id=18919

Mathias LANG <pro.mathias.lang@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pro.mathias.lang@gmail.com

--- Comment #1 from Mathias LANG <pro.mathias.lang@gmail.com> ---
Just hit this one while trying to be smart. I agree it should work this way.

--
February 05, 2021
https://issues.dlang.org/show_bug.cgi?id=18919

--- Comment #2 from Dennis <dkorpel@live.nl> ---
*** Issue 21211 has been marked as a duplicate of this issue. ***

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=18919

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
May 23, 2023
https://issues.dlang.org/show_bug.cgi?id=18919

Adam D. Ruppe <destructionator@gmail.com> changed:

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

--
December 30
https://issues.dlang.org/show_bug.cgi?id=18919

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@tim-dlang created dlang/dmd pull request #15968 "Fix issue 18919 - __FILE__ and __LINE__ should work when used in defa…" fixing this issue:

- Fix issue 18919 - __FILE__ and __LINE__ should work when used in default argument expressions

  The parser now always creates AST nodes for default init expressions
  like __FILE__. They are replaced in resolveLoc. Variable inDefaultArg
  in Scope is used, so the nodes are not replaced too early.

https://github.com/dlang/dmd/pull/15968

--
January 07
https://issues.dlang.org/show_bug.cgi?id=18919

Dlang Bot <dlang-bot@dlang.rocks> changed:

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

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #15968 "Fix issue 18919 - __FILE__ and __LINE__ should work when used in defa…" was merged into master:

- b2b81060411ae02d8336cd0aa47265775f29a8b4 by Tim Schendekehl:
  Fix issue 18919 - __FILE__ and __LINE__ should work when used in default
argument expressions

  The parser now always creates AST nodes for default init expressions
  like __FILE__. They are replaced in resolveLoc. Variable inDefaultArg
  in Scope is used, so the nodes are not replaced too early.

https://github.com/dlang/dmd/pull/15968

--