crayon icon indicating copy to clipboard operation
crayon copied to clipboard

Nested breaks/continues inside try/catch/finallys don't behave correctly

Open blakeohare opened this issue 8 years ago • 0 comments

There's still a problem with the postFinallyBehavior being a scalar. Should be a stack instead. Exhibit A:

for (item : list) {
    try {
        break;
    } finally {
        for (item2 : list2) {
            try {
                continue; // The sets the stack's postFinallyBehavior, overriding the break
            } finally {
                print("The continue should now occur");
            } // should continue
        }
        print("The break will now occur, supposedly.");
    } // should break, but doesn't 
}

blakeohare avatar Oct 22 '16 19:10 blakeohare