Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function name cannot be reassigned in it's scope. #3518

Open
ahaoboy opened this issue Dec 13, 2023 · 0 comments
Open

Function name cannot be reassigned in it's scope. #3518

ahaoboy opened this issue Dec 13, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ahaoboy
Copy link
Contributor

ahaoboy commented Dec 13, 2023

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 ahaoboy added the bug Something isn't working label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant