UnityScript variable scope

Obviously every method in UnityScript has a separate scope for variables, but blocks don’t:

var y;
if (true) {
    var y; // error: There is already a local variable with the name 'y'.
    var x;
} else {
    var x; // error: There is already a local variable with the name 'x'.
}

From what i found on the wiki, an older version of UnityScript had the usual approach of blocks providing a new declaration space. Thus i’m wondering, is this intentional for some reason or just an oversight?

No, it’s always worked that way. It’s intentional, because that’s how Javascript works.

Javascript scope is functional, not block oriented. Everything within one function is within one scope. Functions defined with functions define a sub-scope