Catch block duplicate identifier bug

Topics: General, Language Specification
Jan 13, 2013 at 4:52 AM

This code says the var in the catch clause is a duplicate identifier:

var a = 5;
switch (a) {
    case 4: break;
    default:
        try {
            //do something
        } catch (someError) {
        }
}
Didn't want to file a bug until I confirmed it's not already a known issue (try inside default block of switch).

Jan 13, 2013 at 6:11 AM

Forgot the var, duh. Please disregard.