~~~gotoskip.d
int main ()
{
   string[string] aa;
   goto A;               // line 4
   aa["X"] = "Y";        // line 5
A:
   return 0;
}
~~~

$ dmd gotoskip.d
gotoskip.d(4): Error: goto skips declaration of variable gotoskip.main.__aaval2 at gotoskip.d(5)

What's wrong here? Only found Issue 11977 [1] in which a declaration and initialization is jumped over. However, the statement in line 5 is neither
a declaration nor an initialization.

[1] https://issues.dlang.org/show_bug.cgi?id=11977

Reply via email to