-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Closed
Copy link
Labels
Spec: DecoratorsoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
💻
- Would you like to work on a fix?
How are you using Babel?
Programmatic API (babel.transform, babel.parse)
Input code
const dec = () => {};
0, @dec class { static {} }Configuration file name
No response
Configuration
{
"plugins": [["@babel/proposal-decorators", { "version": "2022-03" }]]
}Both the 2022-03 and 2021-12 version are affected. The legacy transform does not throw.
Current and expected behavior
Current: Babel throws "cannot turn ClassExpression to a statement".
Expected: It should be transformed or if not, provide a better error message.
Environment
REPL
Possible solution
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
Spec: DecoratorsoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue