Open overlookmotel opened 11 months ago
A "silent" const is a function expression name which cannot be assigned to, but which doesn't throw an error when assigned to in sloppy mode code.
These are handled correctly in functions. e.g.:
// Sloppy mode module.exports = function f() { f = console.log('hello!'); };
Output:
module.exports = function f() { console.log('hello!'); // `f =` assignment removed };
However, while writing fix for #528, I realised there are no tests for this.
A "silent" const is a function expression name which cannot be assigned to, but which doesn't throw an error when assigned to in sloppy mode code.
These are handled correctly in functions. e.g.:
Output:
However, while writing fix for #528, I realised there are no tests for this.