You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
abrenneke
changed the title
ref is not defined when destructuring class constructor object with certain browser targetsref is not defined when destructuring class method object with certain browser targets
Dec 1, 2023
abrenneke
changed the title
ref is not defined when destructuring class method object with certain browser targetsref is not defined when destructuring class method argument with certain browser targets
Dec 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.
Describe the bug
When the following conditions are true:
A
ref
variable is referenced outside the class, and the variable does not exist at that point in the code execution.This only happens with certain
targets
:Chrome >= 46
Chrome >= 47
Chrome >= 48
Chrome >= 49
Chrome >= 50
Input code
Bad output code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.3.101-nightly-20231201.1&code=H4sIAAAAAAAAA0utKMgvKlFIzkksLlZwU6jmUlBI1KhWSNJRSFaoVbBVKM1LSU3LzEtN0VSoruWq5QIAmqfhMjAAAAA%3D&config=H4sIAAAAAAAAA2WOvQ7CMAyE9z5F5JmBBQYkWJh5iKi4JSh%2FslNEVPXdSdKmFLFY8Xfny42NEPDkFk5iTM%2B0eEmMtO6JcLRBvhOBED1yS8oH2FU1cJY6qRkLmmYFtHOMVVmYUVZ1cZvdOuMJmX%2BN2Sptr%2FE%2FuQww7j4UdSmdi%2BWCyEf4mupvazIovtXLQMPM0L42QZJ6DLkOXB%2FkDIrLWRz2JbSZPl6W03suAQAA
SWC Info output
No response
Expected behavior
Generates valid code that does not SyntaxError
Actual behavior
Generates code that is invalid to run
Version
1.3.100
Additional context
No response
The text was updated successfully, but these errors were encountered: