[Issue 19205] [REG 2.081] Cannot call superclass ctor after end of switch statement

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 18 09:46:21 UTC 2019


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

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com
           Severity|regression                  |enhancement

--- Comment #3 from Walter Bright <bugzilla at digitalmars.com> ---
The constructor flow analysis is primitive, and whenever it sees a label it
decides "could be a loop" and treats it as a loop. Case statements are indeed
labels, as one can goto them.

The reason this code used to compile is because case statements were not
checked - there could have been loops. This problem was fixed.

I'm going to redo this as an Enhancement Request for flow analysis in the
constructors.

--


More information about the Digitalmars-d-bugs mailing list