make the binding path for a function declaration the function itself

This commit is contained in:
Sebastian McKenzie 2015-10-28 23:06:47 +00:00
parent 25daed751d
commit 953a121aad

View File

@ -465,7 +465,7 @@ export default class Scope {
if (path.isLabeledStatement()) {
this.registerBinding("label", path);
} else if (path.isFunctionDeclaration()) {
this.registerBinding("hoisted", path.get("id"));
this.registerBinding("hoisted", path.get("id"), path);
} else if (path.isVariableDeclaration()) {
var declarations = path.get("declarations");
for (let declar of (declarations: Array)) {