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

Strict mode does not work at function-level granularity #14251

Open
vdata1 opened this issue Sep 30, 2024 · 0 comments
Open

Strict mode does not work at function-level granularity #14251

vdata1 opened this issue Sep 30, 2024 · 0 comments
Labels
bug Something isn't working transpiler parser || printer

Comments

@vdata1
Copy link

vdata1 commented Sep 30, 2024

What version of Bun is running?

1.1.30

What platform is your computer?

Darwin 23.6.0 x86_64 i386

What steps can reproduce the bug?

Hi,

I would like to report that Bun strict mode is not effective at function-level. It can be reproduced by running the following code example:

var global = this;

function f() {
  "use strict";
  console.log(gNonStrict());
}
function gNonStrict() {
    return gNonStrict.caller.name;
  }
  
f.apply(global); 

Thanks,

AH

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

@vdata1 vdata1 added bug Something isn't working needs triage labels Sep 30, 2024
@nektro nektro added transpiler parser || printer and removed needs triage labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working transpiler parser || printer
Projects
None yet
Development

No branches or pull requests

2 participants