We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The code below should log 42, but when compiling to es2015 it throws that Class "A" cannot be referenced in computed property keys.
42
Class "A" cannot be referenced in computed property keys
let capturedPrivateAccess; class A { static #x = 42; static [(class {}, capturedPrivateAccess = () => A.#x)]; } console.log(capturedPrivateAccess());
{ "jsc": { "parser": { "syntax": "typescript", "tsx": true, "decorators": true }, "target": "es2021", "loose": false, "minify": { "compress": false, "mangle": false } }, "module": { "type": "es6" }, "minify": false, "isModule": true }
https://play.swc.rs/?version=1.3.100&code=H4sIAAAAAAAAA8tJLVFITiwoKS1KTQkoyixLLEl1TE5OLS625krOSSwuVnBUqOZSUCguSSzJTFZQrlCwVTAxskaIRGtAlFXX6mA3B6hBQ1PB1k7BUU%2B5QjPWmquWKzk%2Frzg%2FJ1UvJz9dA6seDU1Nay4AEGZf35oAAAA%3D&config=H4sIAAAAAAAAA1VPQQ7DIAy79xUo5x22HnbYH%2FYIRNOKCQpKUmlV1b8PWmDbLbEdO946peDFBh5qS2NaoiZGantCeJ1FvxMCskZkQzYKXCornCmhBRs0oAmkJRAX5iD2kwfRNKFkO%2BT%2B2t%2BKFbgQGBM8asfFC7yd7bj%2BPmOCj4TM%2F8Is1fPk2v2Z2JVU8GFYDrKUzEXOD%2B7wFdWwZgyWn%2FXy6LF%2FAOsBZQowAQAA
No response
throws at runtime
1.3.100
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
The code below should log
42
, but when compiling to es2015 it throws thatClass "A" cannot be referenced in computed property keys
.Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.3.100&code=H4sIAAAAAAAAA8tJLVFITiwoKS1KTQkoyixLLEl1TE5OLS625krOSSwuVnBUqOZSUCguSSzJTFZQrlCwVTAxskaIRGtAlFXX6mA3B6hBQ1PB1k7BUU%2B5QjPWmquWKzk%2Frzg%2FJ1UvJz9dA6seDU1Nay4AEGZf35oAAAA%3D&config=H4sIAAAAAAAAA1VPQQ7DIAy79xUo5x22HnbYH%2FYIRNOKCQpKUmlV1b8PWmDbLbEdO946peDFBh5qS2NaoiZGantCeJ1FvxMCskZkQzYKXCornCmhBRs0oAmkJRAX5iD2kwfRNKFkO%2BT%2B2t%2BKFbgQGBM8asfFC7yd7bj%2BPmOCj4TM%2F8Is1fPk2v2Z2JVU8GFYDrKUzEXOD%2B7wFdWwZgyWn%2FXy6LF%2FAOsBZQowAQAA
SWC Info output
No response
Expected behavior
42
Actual behavior
throws at runtime
Version
1.3.100
Additional context
No response
The text was updated successfully, but these errors were encountered: