[Issue 235] goto & scope: cannot goto forward into different try block level

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 20 14:51:11 PST 2006


http://d.puremagic.com/issues/show_bug.cgi?id=235


daekharel at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daekharel at gmail.com
           Severity|normal                      |critical




------- Comment #2 from daekharel at gmail.com  2006-11-20 16:51 -------
I've verified this bug on DMD 0.174. In addition, the same problem appears in
the following code:

class Foo {
    invariant {}
    synchronized void foo() { return; }
}

After fiddling around to see when an error occurs, it seems the problem arises
in the presence of the combination of both an invariant and a synchronized
method with a return statement (even if the invariant and return statement do
nothing, as in the example above). However, I've managed to get code which has
this combination to compile on Windows under DMD 0.174, but the same code would
not compile on Linux, as it caused this error, so it may be a linux-only
problem.

Since having invariants and synchronized methods in the same class is far from
an uncommon use-case, I'm raising the severity of this bug to critical.


-- 




More information about the Digitalmars-d-bugs mailing list