Thread overview
[Issue 22298] [DIP1000] Nested function's scope parameters can be assigned to variables in enclosing function
Jan 12
Dennis
Jan 13
Dlang Bot
Jan 14
Dlang Bot
January 12
https://issues.dlang.org/show_bug.cgi?id=22298

Dennis <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |safe, Vision
                 CC|                            |[email protected]

--- Comment #1 from Dennis <[email protected]> ---
The problem is that `VarDeclaration.enclosesLifetimeOf(VarDeclaration v)` in declaration.d considers parameters to always have a longer lifetime than local variables, without considering if the parameter and local variable actually belong to the same function.

--
January 13
https://issues.dlang.org/show_bug.cgi?id=22298

Dlang Bot <[email protected]> changed:

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

--- Comment #2 from Dlang Bot <[email protected]> ---
@dkorpel created dlang/dmd pull request #13530 "Fix issue 22298 - Nested function's scope parameters can be assigned to variables in enclosing function" fixing this issue:

- Fix issue 22298 - Nested function's scope parameters can be assigned to variables in enclosing function

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

--
January 14
https://issues.dlang.org/show_bug.cgi?id=22298

Dlang Bot <[email protected]> changed:

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

--- Comment #3 from Dlang Bot <[email protected]> ---
dlang/dmd pull request #13530 "Fix issue 22298 - Nested function's scope parameters can be assigned to variables in enclosing function" was merged into master:

- 87226872ebb9d218d21d14350f22748783ac9176 by dkorpel:
  Fix issue 22298 - Nested function's scope parameters can be assigned to
variables in enclosing function

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

--