Issue ID: 18607
           Summary: using labelled continue in tuple foreach can break
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd

int test(T...)() pure {
        L:foreach(_; T) {
                continue L;
                return 1;

The only return statement in this function is unreachable, so this returns an
uninitialized int as long as >= 1 template parameter is specified. This should
not have been able to be marked pure.

The pure attribute is automatically inferred but I've explicitly added it here.


Reply via email to