Thread overview
[Issue 22421] static foreach introduces semantic difference between indexing and iteration variable
Oct 18, 2021
Adam D. Ruppe
Nov 01, 2021
Dlang Bot
Nov 04, 2021
Dlang Bot
October 18, 2021
https://issues.dlang.org/show_bug.cgi?id=22421

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

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

--- Comment #1 from Adam D. Ruppe <destructionator@gmail.com> ---
i wanna follow the thread

i suspect this has to do with an assignment to a temporary in the loop forcing eval of the ctfe thing, turning it from an alias symbol into a value.

but using the `alias` keyword in the static foreach still does it which makes me not sure.

--
November 01, 2021
https://issues.dlang.org/show_bug.cgi?id=22421

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

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

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@BorisCarvajal created dlang/dmd pull request #13252 "Fix Issue 22421 - static foreach introduces semantic difference between indexing and iteration variable" fixing this issue:

- Fix Issue 22421 - static foreach introduces semantic difference between indexing and iteration variable

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

--
November 04, 2021
https://issues.dlang.org/show_bug.cgi?id=22421

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

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

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #13252 "Fix Issue 22421 - static foreach introduces semantic difference between indexing and iteration variable" was merged into master:

- 888beec5512e676a59c7c8ef3bee532e9a519bc1 by Boris Carvajal:
  Fix Issue 22421 - static foreach introduces semantic difference between
indexing and iteration variable

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

--