-
-
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
_ts_dispose_resources is not correctly invoked for using
keyword
#9673
Comments
Investigation:
swc/crates/swc_ecma_transforms_base/src/helpers/mod.rs Lines 549 to 630 in 70fcbc4
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The
Symbol.dispose
function is not invoked when using theusing
keyword.The output includes
However, this function is defined as
So calling
_ts_dispose_resources(env);
does not actually invoke the dispose logic.The function does seem to be invoked here, so something else must be going wrong:
swc/crates/swc_ecma_transforms_base/src/helpers/_ts_dispose_resources.js
Line 32 in 8f45eaf
Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.7.39&code=H4sIAAAAAAAAAystzsxLV6hQsFWo5lJQiA6uzE3Kz9FLySwuyC9OjdXQBAsrKCTn5xXn56Tq5eSnayhBZVOUNIFytVy11gBoxdWzRQAAAA%3D%3D&config=H4sIAAAAAAAAA1VPOw6DMAzdOQXyzFAx9g4svYGVGhSUn2IjgRB3bxIgbbe8f7w3bQszK3i2e3omEDAyxYoTw5sTXBMDpCyyijoIdLc6c5ZGNEwd0BqMVlpexH6JigZ0OJElJ%2FCUuFAJHWcWBONEUnq5f%2FT91QnGe6baeXJWOz1uv79S3oZIzP%2FGbEU3mZo%2FF5trFax%2FL0W8rpUtZJTbrHczw9d5L9Z20Dzc8XLM8QEIU%2BriPgEAAA%3D%3D
SWC Info output
No response
Expected behavior
console.log("disposed")
should runActual behavior
No log message
Version
1.7.39
Additional context
See also #9576
The text was updated successfully, but these errors were encountered: