Bug with labeled break in catch and finally x

Zalim Bashorov zalim.bashorov at jetbrains.com
Mon Mar 20 10:34:04 UTC 2017


Hello!

I found the bug in nashorn (1.8.0_121) -- all following functions return
undefined but should return "OK":

function box1() {
    label: {
        try {
            throw 1;
        }
        catch (e) {
            break label;
        }
        throw 2;
    }
    return 'OK';
};

function box2() {
    label: {
        try {
            throw 1;
        }
        finally {
            break label;
        }
        throw 2;
    }
    return 'OK';
};

function box3() {
    label: {
        try {
            throw 1;
        }
        finally {
            break label;
        }
    }
    return 'OK';
};


Where can I file an issue about it?

Thanks!
--
Best regards,
Zalim Bashorov
Developer
JetBrains
http://www.jetbrains.com
The Drive to Develop


More information about the nashorn-dev mailing list