{"record":{"id":"708cedbdcec9147e","repo":"swc-project/swc","slug":"swc-does-not-support-do-expressions","errorCode":null,"errorMessage":"swc does not support do expressions","messagePattern":"swc does not support do expressions","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/swc_estree_compat/src/swcify/expr.rs","lineNumber":1114,"sourceCode":"        swc_ecma_ast::JSXClosingFragment {\n            span: ctx.span(&self.base),\n        }\n    }\n}\n\nimpl Swcify for BindExpression {\n    type Output = Never;\n\n    fn swcify(self, _: &Context) -> Self::Output {\n        panic!(\"swc does not support bind expressions\")\n    }\n}\n\nimpl Swcify for DoExpression {\n    type Output = Never;\n\n    fn swcify(self, _: &Context) -> Self::Output {\n        panic!(\"swc does not support do expressions\")\n    }\n}\n\nimpl Swcify for PipelinePrimaryTopicReference {\n    type Output = Never;\n\n    fn swcify(self, _: &Context) -> Self::Output {\n        panic!(\"swc does not support `PipelinePrimaryTopicReference`\")\n    }\n}\n\nimpl Swcify for RecordExpression {\n    type Output = Never;\n\n    fn swcify(self, _: &Context) -> Self::Output {\n        panic!(\"swc does not support record expressions\")\n    }\n}","sourceCodeStart":1096,"sourceCodeEnd":1132,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_estree_compat/src/swcify/expr.rs#L1096-L1132","documentation":"Raised in `Swcify for DoExpression` (swcify/expr.rs:1114). Do expressions (`do { ... }`) are a stage-1 proposal with no representation in swc_ecma_ast, so the impl is a stub returning `Never` that panics unconditionally when a DoExpression node from the Babel AST is swcified. The do-expression node is the triggering input.","triggerScenarios":"Thrown at crates/swc_estree_compat/src/swcify/expr.rs:1114 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reject inputs containing do expressions with an explicit unsupported-syntax error before swcification","Desugar `do { ... }` to an IIFE in a preprocessing pass before converting","Disable do-expression syntax in the parser configuration that generates the Babel AST"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}