-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
fail to execute ts file with complex if statement with many nested braces #57471
Comments
hi. the issue actually originates from
RuntimeError: memory access out of bounds |
Link to SWC issue: swc-project/swc#10207 |
Created a test in amaro nodejs/amaro#213 so whenever its fixed I'll release it |
Version
v23.9.0
Platform
Subsystem
No response
What steps will reproduce the bug?
the following code can be executed in
.js
, but fails to be run as.ts
:How often does it reproduce? Is there a required condition?
it fails all the time.
What is the expected behavior? Why is that the expected behavior?
the code should execute without error
What do you see instead?
it errors out with the following error:
Additional information
if you reduce the complexity of nested braces from 179 layers to 158 layers or less, it starts working. e.g.:
please note that these are generated code by Ajv standalone validator, not hand written. so it's not something we can easily simplify (e.g. using prettier) unless making changes to our existing development process.
thank you so much!
The text was updated successfully, but these errors were encountered: