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

swc not emit any transformation for 'using' keyword. #7879

Closed
dudubs opened this issue Aug 27, 2023 · 4 comments · Fixed by #7881
Closed

swc not emit any transformation for 'using' keyword. #7879

dudubs opened this issue Aug 27, 2023 · 4 comments · Fixed by #7881
Assignees
Labels
Milestone

Comments

@dudubs
Copy link

dudubs commented Aug 27, 2023

Describe the bug

No any transformation for resource management

Input code

using x = a();

Config

{
  
  "jsc": {
    "parser": {
      "syntax": "typescript",
      "tsx": true,
      
    },
    "target": "es5",
    "loose": false,
    "minify": {
      "compress": false,
      "mangle": false
    }
  },
  "module": {
    "type": "commonjs"
  },
  "minify": false,
  "isModule": true,
  "experimental": {
    "plugins":["proposal-explicit-resource-management"]
  },
 
}

Playground link

https://play.swc.rs/?version=1.3.80&code=H4sIAAAAAAAAAystzsxLV6hQsFVI1NC0BgCXu343DgAAAA%3D%3D&config=H4sIAAAAAAAAA1VQzWrDMAy%2B5ymCzg2UjF32DrvuMnYwrhJcbMtICjSUvvvkNU4z44MlfX%2FWvet7u3AVDx%2F93Z5WKLssE3HaW%2B3ABT2xU%2BIvZAmUDQHjeRyH8xvsyMfpqVMcC%2FJBBGTN6m6VpGtB8RyKwqlNVepIecHW6o5y6nhGrWSU940FkUjQepOLstEghRym9ejrKRVGkf%2FACnV5jjv%2FaddtlpDosvwN214sc7U3tUT5KvBCNsddHYJ8Nnr7EeCtIIeEtoT4ki1xmUO2bN9QmAqJi4MhY%2FBBB0tNC3scLKmbsXLhZ%2FPtHr8zRB2tvwEAAA%3D%3D

SWC Info output

No response

Expected behavior

expect to any transformation for resource management.

Actual behavior

just as input code,
using x = a();

Version

1.3.80

Additional context

No response

@ffMathy
Copy link

ffMathy commented Aug 31, 2023

I tried version 1.3.81. It gives a different error now.

TypeError: Property [Symbol.dispose] is not a function

In this case, I don't have a Symbol.dispose, because I am using the async variant Symbol.asyncDispose.

So there is a bug still.

cc @kdy1

@kdy1
Copy link
Member

kdy1 commented Aug 31, 2023

Please file another issue with a repro

@ffMathy
Copy link

ffMathy commented Aug 31, 2023

Submitted here: #7902.

@swc-bot
Copy link
Collaborator

swc-bot commented Oct 1, 2023

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.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

4 participants