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
error in ** => Math.pow(bigInt, bigInt) #2626
Comments
Yes, I am not a fan of adding a bigint specific polyfill at this point until we have official bigint support in acorn and even then maintaining this hand-crafted algorithm would require quite a few tests. |
Also note that your algorithm still relies on bigint support on the system where rollup is run which is definitely not guaranteed. |
Fix at #2640 |
Sure. Thank you! I will wait the fix version release and try. |
How Do We Reproduce?
input.js:
Expected Behavior
Actual Behavior
The problem code is in repo/src/ast/nodes/BinaryExpression.ts:
I tried to fix that and make a PR, but with difficult:
(1) Change
Math.pow(left, right)
toleft ** right
is best, but I have no idea about why here isMath.pow
, maybe for old version Node.js.(2) Replacing with this can fix the error too:
But I don't know how to add test for this bugfix in repo rollup.
(3) I tried
**=
, that will not be computed so there is no problem now, but maybe in somewhere it need to be fix as the same. I'm not sure.So it still need other one who can manage these to fix that. Thanks!
The text was updated successfully, but these errors were encountered: