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

toString() not output conditions #16499

Open
alwerr opened this issue Jan 18, 2025 · 0 comments
Open

toString() not output conditions #16499

alwerr opened this issue Jan 18, 2025 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@alwerr
Copy link

alwerr commented Jan 18, 2025

What version of Bun is running?

1.1.42

What platform is your computer?

win x64

What steps can reproduce the bug?

When using toString() on function the if its not in the output

var t = () => {
  if (1 == 1)
    print(32)
}
console.log(t.toString());

output :

() => {     
  print(32);
} 

instead of

() => {
  if (1 == 1)
    print(32)
}

What is the expected behavior?

The if is in the output

What do you see instead?

() => {     
  print(32);
}

Additional information

In node it works and the output is

() => {
  if (1 == 1)
    print(32)
}
@alwerr alwerr added bug Something isn't working needs triage labels Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant