Thread overview
[Issue 22227] `if (scope f = x())` and `while (scope f = x())` do not parse
Aug 20, 2021
Per Nordlöw
Aug 21, 2021
Dennis
Aug 21, 2021
Dlang Bot
Aug 21, 2021
Dlang Bot
Aug 21, 2021
Dlang Bot
Aug 21, 2021
Dlang Bot
August 20, 2021
https://issues.dlang.org/show_bug.cgi?id=22227

Per Nordlöw <per.nordlow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |per.nordlow@gmail.com

--- Comment #1 from Per Nordlöw <per.nordlow@gmail.com> ---
Looking at how

```
for (scope i = 0; i < 1; ++i) {}
```

is parsed might give guidance.

--
August 21, 2021
https://issues.dlang.org/show_bug.cgi?id=22227

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |
                 CC|                            |dkorpel@live.nl
           Severity|normal                      |enhancement

--- Comment #2 from Dennis <dkorpel@live.nl> ---
The spec doesn't allow storage classes in IfCondition, only `auto` or a type. __gshared and static also don't parse inside if-statements and while-statements. Marking as an enhancement instead of rejects-valid.

--
August 21, 2021
https://issues.dlang.org/show_bug.cgi?id=22227

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@dkorpel created dlang/dlang.org pull request #3091 "Update grammar for issue 22227" mentioning this issue:

- update grammar for issue 22227

https://github.com/dlang/dlang.org/pull/3091

--
August 21, 2021
https://issues.dlang.org/show_bug.cgi?id=22227

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

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

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
@dkorpel created dlang/dmd pull request #12999 "Fix issue 22227 - `if (scope f
= x())` and `while (scope f = x())` do not parse" fixing this issue:

- fix issue 22227 - `if (scope f = x())` and `while (scope f = x())` do not
parse

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

--
August 21, 2021
https://issues.dlang.org/show_bug.cgi?id=22227

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

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

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #12999 "Fix issue 22227 - `if (scope f = x())` and
`while (scope f = x())` do not parse" was merged into master:

- 368d408de2fcd8165fb70085eb2afa380a12f565 by dkorpel:
  fix issue 22227 - `if (scope f = x())` and `while (scope f = x())` do not
parse

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

--
August 21, 2021
https://issues.dlang.org/show_bug.cgi?id=22227

--- Comment #6 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dlang.org pull request #3091 "Update grammar for issue 22227" was merged into master:

- 24becf5fa95e9c606e3ba1b0a13d171f721a292c by dkorpel:
  update grammar for issue 22227

https://github.com/dlang/dlang.org/pull/3091

--