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
The set function reassigns itself internally.
When eval exists within the scope, the set function's name should be protected, but it's incorrectly renamed to set1, causing the helpers to fail to execute properly.
functionset1(target,property,value,receiver){if(typeofReflect!=="undefined"&&Reflect.set){set1=Reflect.set;}else{set1=functionset1(target,property,value,receiver){varbase=_super_prop_base(target,property);vardesc;if(base){desc=Object.getOwnPropertyDescriptor(base,property);if(desc.set){desc.set.call(receiver,value);returntrue;}elseif(!desc.writable){returnfalse;}}desc=Object.getOwnPropertyDescriptor(receiver,property);if(desc){if(!desc.writable){returnfalse;}desc.value=value;Object.defineProperty(receiver,property,desc);}else{_define_property(receiver,property,value);}returntrue;};}returnset1(target,property,value,receiver);}function_set(target,property,value,receiver,isStrict){vars=set(target,property,value,receiver||target);if(!s&&isStrict){thrownewError("failed to set property");}returnvalue;}
Version
1.7.36
Additional context
No response
The text was updated successfully, but these errors were encountered:
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
The set function reassigns itself internally.
When
eval
exists within the scope, the set function's name should be protected, but it's incorrectly renamed toset1
, causing the helpers to fail to execute properly.It was introduced by #9546
Input code
Config
No response
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.7.37-nightly-20241021.1&code=H4sIAAAAAAAAA03NPQ6DMAwF4Dk%2BhcUUlt6Aob1JFFwYrKSynYBUcffyUxCbZX%2FvOXJQxSd%2BwU1ZuMcO34GVYAGgGtg3IzHnpgWIO30hzUap%2F4diTmpSomXx7bZwWj60zuDWBqdkuBf4ers%2Bzlf1UMOlDiRkRRLe7OaWH0dO9hOsAAAA&config=H4sIAAAAAAAAA12PSw6DMAxE95wCed1tNz1BNz2ElRoU5HxkBwmEuHsDJLRll3ljjydL07YwqIFHu%2BRnFhFFSU6dic4%2B4ZQJkHGoRmxMcKvuoJvVISvtaD0cSIJeuyAuu35krhilp7SH6b2kAIegVFMKoymReOQncSTRi%2Bust93829Kh7%2FkSkrEJLgqp%2FndsSk9w4T3uW%2BX3aY6b2tZc8IPCOWn1VWfPC98aR%2Fb6AXANGa1PAQAA
SWC Info output
No response
Expected behavior
keep name
set
Actual behavior
set
is renamed toset1
while usages are stillset
Version
1.7.36
Additional context
No response
The text was updated successfully, but these errors were encountered: