boa icon indicating copy to clipboard operation
boa copied to clipboard

Function name cannot be reassigned in it's scope.

Open ahaoboy opened this issue 2 years ago • 0 comments

Describe the bug Function name cannot be reassigned in it's scope.

To Reproduce

boa ./main.js

Uncaught TypeError: cannot mutate an immutable binding 'fn'
"use strict";

function fn() {
  fn = function () { }
}


fn()

This is ok.

"use strict";

function fn() {
}


fn = 1;

ahaoboy avatar Dec 13 '23 10:12 ahaoboy