[jsinterp] Fix undefined variable name caching (#13677)

Fix b342d27f3f

Authored by: bashonly
This commit is contained in:
bashonly 2025-07-09 15:45:47 -05:00 committed by GitHub
parent aa9f1f4d57
commit 805519bfaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 2 deletions

View file

@ -536,6 +536,11 @@ class TestJSInterpreter(unittest.TestCase):
}
''', 31)
def test_undefined_varnames(self):
jsi = JSInterpreter('function f(){ var a; return [a, b]; }')
self._test(jsi, [JS_Undefined, JS_Undefined])
self.assertEqual(jsi._undefined_varnames, {'b'})
if __name__ == '__main__':
unittest.main()