Thread overview
[Issue 827] Trying to break out of a labelled BlockStatement breaks out of a for loop at its beginning
Oct 23, 2017
Nick Treleaven
May 23, 2019
RazvanN
October 23, 2017
https://issues.dlang.org/show_bug.cgi?id=827

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick@geany.org

--- Comment #4 from Nick Treleaven <nick@geany.org> ---
(In reply to Stewart Gordon from comment #0)
> ----------
>     block: {
>         for (int i = 0; i < 10; i++) {
>             if (i == 5) break block;
>         }

dmd 2.076.1 (dpaste) now gives:
/d220/f421.d(7): Error: label `block` has no break

--
May 16, 2019
https://issues.dlang.org/show_bug.cgi?id=827
Issue 827 depends on issue 199, which changed state.

Issue 199 Summary: (D1 only) Label causes scope to collapse into parent https://issues.dlang.org/show_bug.cgi?id=199

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INVALID

--
May 23, 2019
https://issues.dlang.org/show_bug.cgi?id=827

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |razvan.nitu1305@gmail.com
         Resolution|---                         |WORKSFORME

--- Comment #5 from RazvanN <razvan.nitu1305@gmail.com> ---
The code in the original bug report now errors in D2. Closing as WORKSFORME.

--