-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Panic on invalid code #9140
Comments
From the AST of the code: "body": [
{
"type": "LabeledStatement",
"span": {
"start": 0,
"end": 36,
"ctxt": 0
},
"label": {
"type": "Identifier",
"span": {
"start": 0,
"end": 5,
"ctxt": 0
},
"value": "https",
"optional": false
},
"body": {
"type": "TsInterfaceDeclaration",
"span": {
"start": 18,
"end": 36,
"ctxt": 0
}, The I attempted to change Perhaps there are two possible solutions:
https: ;
https: interface Fake {} |
fixed in #9364. |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the bug
SWC panics when it encounters this particular source that is invalid JS. The error can be reproduced in the SWC playground.
Originally reported at denoland/deno#24417
Input code
Config
No response
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.6.7&code=H4sIAAAAAAAAA8soKSkottLXT0vMTtVLzs%2Fl4srMK0ktSktMTlVwA4opVHPVAgDVU9KdJAAAAA%3D%3D&config=H4sIAAAAAAAAA1WQPQ7CMAyFd05ReWZAHRi4AxMnsIJbBTU%2Fsh2JCvXuJOn%2FEiXfe8%2BO%2Fbs0DXzEwKP55Wt%2BRGQh3t6ZyOgVv5mAjpHEsI0K11VVKZJyokqmWQBF7klLiKS9te0SgCEEoYw7HIQW5qy33XhsaYKLTCJnY7Gi74ctf%2B7I6KUL7I6FmNDoAWRkXQysr5DYlELgo3vMtutu4uTVuqpj0uBQrYFFni7rWVuDC%2B9U%2F7RssGxpHvwOu2mdcZsHrDzXZF3f9Ae8XWptjQEAAA%3D%3D
SWC Info output
No response
Expected behavior
SWC should not panic
Actual behavior
No response
Version
1.6.8-nightly-20240704.3
Additional context
No response
The text was updated successfully, but these errors were encountered: