-
-
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
Minify strip method in object that should exist #9148
Comments
I think it's fine to remove function foo() {
const obj = {
clear: function () {
console.log('clear')
},
start: function () {
setTimeout(function () { // <- this belongs to function here
this.clear();
});
}
};
return () => obj.start()
}; |
Thank you ! |
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
Remove class member that is accessed by another class member
Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.6.6&code=H4sIAAAAAAAAA21POw7DIAzdOYW3GKniAI3SU%2FQCaWQaKoolMFPF3UMsumXx53388TVtEjiBZ0YLPwOwcSoC%2FPrAon1HIq35Dv6vHUKlupgjuchvnFQ3WaXaTVORNcu1tZA8w5e4Cl7RALKH4nQm2nmgbVStx3aWmaRmNS6P82inG9Gazhp96gCae6CK4wAAAA%3D%3D&config=H4sIAAAAAAAAA32VO47jMAxA%2B5wicD3FYoot9gCLbeYMAmNRjmZk0RCpfDDI3Ze2FSeTyOliPv5JMd%2Bb7bb55Lb5s%2F3Wn%2FoxQGJMy7dK%2BBwFTipp5Dwgt8kP0rxdqfCIJGVcRBZbSiCUuJAJXN42cwSB1KGM%2FpDff72%2FF1%2BNJIjsKPX3wRdfHyhgQeBHsEsxxZNgihD%2BYRhwCVtgIGJUkYPAV1nvo3fn%2B0At9UNC5juZSjXV3GMU%2FmlfWKIjPxSv8h1RQC1lnRhg46NgN%2Bf66LilEGBgNAdIFS9jppA8Uy3ECLOgNUOiocqj9eJJm1WhFsGalixWkE%2FYij9gzUxjqVlkLa9Sz4Qt7nLXTZv1YI0HCBmkEhNP00g024rXPXkW43KstXCGKz2YYWnuo6V3JqHkFJ%2FtPsnHlZl8IWoHAjBH6LHmd9Jwuk9r1u6lpY9OV1bOFa77XasyYqdNNd67SmfHzmASX5tmQptbHDvb1tIpeKV97C0adE53peKaj17afS3oeFrIVYDOF1xtq2Zglle4wscH8QL%2F1SqlvmBFowfZr1M%2B9zsKLwL0KHuyLxR0FELrOOmVOA3rPEeLuhpoqyqZJ%2FB8BPQBCJkw3eGn3dDnoR5NF2h3OxNF4bKc%2BR5id3vv8z3eFIWmJ5snWP5WxvnOJ%2F93c1O6XuEl8cbzx9VS0%2F%2BKdIzN5vIfIdZH36cGAAA%3D
SWC Info output
No response
Expected behavior
obj.clear
should exist in output, as it is accessed by another member in the objectActual behavior
clear
method is removedVersion
1.6.6
Additional context
No response
The text was updated successfully, but these errors were encountered: