Thread overview
[Issue 23073] [dip1000] scope inference from pure doesn't consider self-assignment
Jun 15, 2022
Dlang Bot
Aug 16, 2022
Walter Bright
Aug 16, 2022
Walter Bright
Aug 17, 2022
Dlang Bot
June 15, 2022
https://issues.dlang.org/show_bug.cgi?id=23073

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

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

--- Comment #1 from Dlang Bot <dlang-bot@dlang.rocks> ---
@dkorpel created dlang/dmd pull request #14217 "Fix 23073 - scope inference from pure doesn't consider self-assignment" fixing this issue:

- Fix 23073 - scope inference from pure doesn't consider self-assignment

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

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

Walter Bright <bugzilla@digitalmars.com> changed:

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

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
Note that if `pure` is removed from assignNext(), the error is correctly
diagnosed and reported.

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

--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> ---
I.e.:

test3.d(17): Error: scope variable `c` assigned to non-scope parameter `c`
calling `assignNext`

(Although calling both variables `c` makes the error message a bit confusing.)

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

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 #14217 "Fix 23073 - scope inference from pure doesn't consider self-assignment" was merged into master:

- e7e00ffa2461f309b1bca8c25cc5b7c5f7397f75 by Dennis Korpel:
  Fix 23073 - scope inference from pure doesn't consider self-assignment

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

--