[Issue 23480] New: non-empty ForStatement Increment clause should require a side effect

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 13 11:28:29 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=23480

          Issue ID: 23480
           Summary: non-empty ForStatement  Increment clause should
                    require a side effect
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: nick at geany.org

int j;
    for({} j; 1*1) {}
    for({j=2; int d = 3; } j+d<7; {j++; d++; }) {}

Each of the above Increment clauses should show 'has no effect' errors.

PR incoming.

--


More information about the Digitalmars-d-bugs mailing list