.length
property of function literals is not readonly
#49113
Labels
Milestone
.length
property of function literals is not readonly
#49113
Bug Report
Function
.length
property is inconsistentlyreadonly
depending on whetherFunction
constructor is used or not.🔎 Search Terms
function length readonly
🕗 Version & Regression Information
v4.6.2 (haven't checked older versions)
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
The
length
property of the function created withnew Function()
isreadonly
while thelength
property of function literals is not.🙂 Expected behavior
Both
length
properties should bereadonly
. Alternative both could be non-readonly
but that seems worse since JS doesn't modify the length when assigning a value.The text was updated successfully, but these errors were encountered: