The following code should not compile but does with DMD 2.041. The goto skips several initializations. void foo() { goto L0; int b; struct S { int a; this(int c) { a=c; } } S s = S(5); class C { int a; } C c = new C; L0: ; s.a++; c.a++; }
Is this the same as bug 602?
(In reply to comment #1) > Is this the same as bug 602? It's related. There's an implicit init being accepted here. However, there are 2 explicit inits being ignored as well, and bug 602 doesn't report that.
Another example: unittest { goto target; int x = 10; target: int y = x; } TDPL claims that that can't happen.
*** This issue has been marked as a duplicate of issue 602 ***