Fixed issue with programPath.scope.references not being regist… (#11323)
This commit is contained in:
committed by
GitHub
parent
46f31460d6
commit
025e4ae44c
@@ -609,6 +609,8 @@ export default class Scope {
|
||||
const ids = path.getOuterBindingIdentifiers(true);
|
||||
|
||||
for (const name of Object.keys(ids)) {
|
||||
parent.references[name] = true;
|
||||
|
||||
for (const id of (ids[name]: Array<Object>)) {
|
||||
const local = this.getOwnBinding(name);
|
||||
|
||||
@@ -620,8 +622,6 @@ export default class Scope {
|
||||
this.checkBlockScopedCollisions(local, kind, name, id);
|
||||
}
|
||||
|
||||
parent.references[name] = true;
|
||||
|
||||
// A redeclaration of an existing variable is a modification
|
||||
if (local) {
|
||||
this.registerConstantViolation(bindingPath);
|
||||
|
||||
Reference in New Issue
Block a user