Thread overview
[Issue 22023] adding `return` to escaped argument of a variadic defeats @safe
Jun 14, 2021
Nicholas Wilson
Sep 08, 2021
Dennis
Feb 23, 2022
Walter Bright
Feb 23, 2022
Dlang Bot
Feb 23, 2022
Dlang Bot
June 14, 2021
https://issues.dlang.org/show_bug.cgi?id=22023

Nicholas Wilson <iamthewilsonator@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, live, safe

--
September 08, 2021
https://issues.dlang.org/show_bug.cgi?id=22023

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dkorpel@live.nl

--- Comment #1 from Dennis <dkorpel@live.nl> ---
Possible solutions:
- disallow `return` on variadic array arguments
- strip `return` on variadic array arguments, making it a no-op
- allocate the array with the GC on the call site when `return` is present

Not sure which is best, I'm leaning towards the first.

--
February 23, 2022
https://issues.dlang.org/show_bug.cgi?id=22023

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
These are called typesafe variadic functions:

https://dlang.org/spec/function.html#typesafe_variadic_functions

--
February 23, 2022
https://issues.dlang.org/show_bug.cgi?id=22023

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

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

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #13710 "fix Issue 22023 - adding to escaped argument of a variadic defeats @…" fixing this issue:

- fix Issue 22023 - adding  to escaped argument of a variadic defeats @safe

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

--
February 23, 2022
https://issues.dlang.org/show_bug.cgi?id=22023

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 #13710 "fix Issue 22023 - adding  to escaped argument of a variadic defeats @…" was merged into master:

- 24b2037256cdbe757e993899063c1c404828b045 by Walter Bright:
  fix Issue 22023 - adding  to escaped argument of a variadic defeats @safe

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

--