-
Notifications
You must be signed in to change notification settings - Fork 683
Open
Copy link
Labels
Description
Reproduction link or steps
What is expected?
{let o=0,_;eval(`let x=1;_=()=>x+o`),_()}What is actually happening?
{let o=0,_;eval(`let x=1;_=()=>x+o`),(void 0)()}System Info
System:
OS: Linux 6.17 EndeavourOS
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Memory: 10.06 GB / 15.36 GB
Container: Yes
Shell: 5.3.3 - /bin/bash
Binaries:
Node: 24.8.0 - /run/user/1000/fnm_multishells/26925_1768214392161/bin/node
Yarn: 1.22.22 - /run/user/1000/fnm_multishells/26925_1768214392161/bin/yarn
npm: 11.6.0 - /run/user/1000/fnm_multishells/26925_1768214392161/bin/npm
pnpm: 10.19.0 - /run/user/1000/fnm_multishells/26925_1768214392161/bin/pnpm
bun: 1.3.5 - /home/reve/.bun/bin/bun
Deno: 2.6.3 - /home/reve/.deno/bin/deno
Browsers:
Brave Browser: 143.1.85.118Any additional comments?
This pattern seems to be a little faster than
new Function('o', 'var x=1;return ()=>x+o')(0)(o)so I want to try it out for some compilation work.