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

RazvanN <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from RazvanN <[email protected]> ---
Actually, the goto is not legal because it skips the declaration of b. For
example, this does not compile:

struct A { /*~this() {}*/ }

void test(int x)
{
   {
      A a;
      goto END;
   }
   A b;

END:

}

onlineapp.d(7): Error: goto skips declaration of variable onlineapp.test.b at
onlineapp.d(9)

Commenting b makes the code compile both with and without the destructor. It
seems that the error message somehow gets swallowed.

--

Reply via email to