diff --git a/lib/6to5/traversal/scope.js b/lib/6to5/traversal/scope.js index 06e878382e..3bbac0dc54 100644 --- a/lib/6to5/traversal/scope.js +++ b/lib/6to5/traversal/scope.js @@ -135,7 +135,7 @@ Scope.prototype.generateTempBasedOnNode = function (node) { }; Scope.prototype.checkBlockScopedCollisions = function (key, id) { - if (this.declarationKinds["let"][key] || this.declarationKinds["const"][key]) { + if (this.bindingKinds["let"][key] || this.bindingKinds["const"][key]) { throw this.file.errorWithNode(id, "Duplicate declaration " + key, TypeError); } }; @@ -201,7 +201,7 @@ Scope.prototype.register = function (node, reference, kind) { this.bindings[key] = id; } - var kinds = this.declarationKinds[kind]; + var kinds = this.bindingKinds[kind]; if (kinds) extend(kinds, ids); }; @@ -271,7 +271,7 @@ Scope.prototype.crawl = function () { } info = block._scopeInfo = { - declarationKinds: { + bindingKinds: { "const": object(), "var": object(), "let": object() @@ -400,7 +400,7 @@ Scope.prototype.addDeclarationToFunctionScope = function (kind, node) { // this ignores the duplicate declaration logic specified in `getInfo` // but it doesn't really matter - extend(scope.declarationKinds[kind], ids); + extend(scope.bindingKinds[kind], ids); }; /** @@ -446,7 +446,7 @@ Scope.prototype.getAllDeclarationsOfKind = function (kind) { var scope = this; do { - defaults(ids, scope.declarationKinds[kind]); + defaults(ids, scope.bindingKinds[kind]); scope = scope.parent; } while (scope);