Allow .name as a static property
benjamn opened this issue · comments
Ben Newman commented
Currently the constructor is a declared function with .name === "constructor"
, and populate(constructor, newStatics, base)
is not able to override that property.
The constructor should be an anonymous function expression instead, so that one can set its .name
property (or not) as one sees fit.
Ben Newman commented
This appears to be impossible in v8, so the best option seems to be simply to forbid .name
static properties.