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

Anti Tooling breaks Symbols #74

Closed
MichaelXF opened this issue May 17, 2023 · 1 comment
Closed

Anti Tooling breaks Symbols #74

MichaelXF opened this issue May 17, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@MichaelXF
Copy link
Owner

Describe the bug:

Anti Tooling breaks Symbols

Config and Small code sample

Config:

{
  target: "node",
  preset: "low"
}

Code:

var sym1 = Symbol();

sym1;
sym1;

Output:

var sym1=Symbol();+(sym1,sym1)

Error:

(node:32216) UnhandledPromiseRejectionWarning: TypeError: Cannot convert a Symbol value to a number

The Anti Tooling feature combines expressions and chooses a random unary operator (void, typeof, -, !, +, or ~) which can cause errors with symbols. Anti Tooling, which currently has no option to be turned off, should not use unary operators that perform numeric conversions to avoid this error from occuring. The other operators work correctly.

@MichaelXF MichaelXF added the bug Something isn't working label May 17, 2023
@Le0Developer
Copy link

Also experiencing this with BigInt.

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

2 participants