add let binding collision todo

This commit is contained in:
Sebastian McKenzie 2015-06-09 04:08:44 +01:00
parent 0595e06e29
commit eaaa279aa5

View File

@ -337,6 +337,7 @@ class BlockScoping {
// this is the defining identifier of a declaration
var ref = letRefs[key];
// todo: could skip this if the colliding binding is in another function
if (scope.parentHasBinding(key) || scope.hasGlobal(key)) {
var uid = scope.generateUidIdentifier(ref.name).name;
ref.name = uid;