fix: for-in loop doesn't declare its binding when it has to

This commit is contained in:
TopchetoEU 2025-01-09 00:09:18 +02:00
parent 12cff84666
commit f8b9776f28
Signed by: topchetoeu
GPG Key ID: 6531B8583E5F6ED4

View File

@ -21,7 +21,9 @@ public class ForInNode extends Node {
@Override public void resolve(CompileResult target) {
body.resolve(target);
binding.resolve(target);
if (isDecl) {
target.scope.define(binding.name);
}
}
@Override public void compileFunctions(CompileResult target) {