You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Any redeclaration of a const identifier in a for-loop initialiser leads to a panic, with any value.
To Reproduce
for(constb=1,b=0;;){}
You can replace the assignment of b with any value.
Expected behavior
This should trigger a syntax error:
for (const b = 1, b = 0; ; ) {
^
SyntaxError: Identifier 'b' has already been declared
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
Node.js v18.16.1
Build environment (please complete the following information):
N/A
Additional context
Discovered by bytecompiler-implied fuzzer.
The text was updated successfully, but these errors were encountered:
Describe the bug
Any redeclaration of a const identifier in a for-loop initialiser leads to a panic, with any value.
To Reproduce
You can replace the assignment of b with any value.
Expected behavior
This should trigger a syntax error:
Build environment (please complete the following information):
N/A
Additional context
Discovered by
bytecompiler-implied
fuzzer.The text was updated successfully, but these errors were encountered: