{"record":{"id":"5c3b6198132f427a","repo":"swc-project/swc","slug":"not-implemented-5c3b61","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/swc_ecma_utils/src/lib.rs","lineNumber":2564,"sourceCode":"            }\n        };\n    }\n\n    pub fn exit_jsx_element_name(&mut self, n: &mut JSXElementName) {\n        if let JSXElementName::Ident(ident) = n {\n            if let Some(expr) = self.query.query_jsx(ident) {\n                *n = expr;\n            }\n        }\n    }\n\n    pub fn exit_jsx_object(&mut self, n: &mut JSXObject) {\n        if let JSXObject::Ident(ident) = n {\n            if let Some(expr) = self.query.query_jsx(ident) {\n                *n = match expr {\n                    JSXElementName::Ident(ident) => ident.into(),\n                    JSXElementName::JSXMemberExpr(expr) => Box::new(expr).into(),\n                    JSXElementName::JSXNamespacedName(..) => unimplemented!(),\n                    #[cfg(swc_ast_unknown)]\n                    _ => return,\n                }\n            }\n        }\n    }\n\n    pub fn exit_object_pat_prop(&mut self, n: &mut ObjectPatProp) {\n        if let ObjectPatProp::Assign(AssignPatProp { key, value, .. }) = n {\n            if let Some(expr) = self.query.query_lhs(&key.id) {\n                let value = value\n                    .take()\n                    .map(|default_value| {\n                        let left = expr.clone().try_into().unwrap();\n                        Box::new(default_value.make_assign_to(op!(\"=\"), left))\n                    })\n                    .unwrap_or(expr);\n","sourceCodeStart":2546,"sourceCodeEnd":2582,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_ecma_utils/src/lib.rs#L2546-L2582","documentation":"Inside swc_ecma_utils' identifier-replacement visitor (used when substituting identifiers, e.g. JSX pragma/import rewriting), exit_jsx_object replaces a JSX object identifier like `Foo` in `<Foo.Bar />`. When the replacement value resolves to a JSXNamespacedName (`<ns:name/>`), there is no valid conversion into the JSXObject position, so it panics with unimplemented!().","triggerScenarios":"Rewriting identifiers in code where an identifier used as a JSX object (`<Foo.Bar></Foo.Bar>`) is mapped to a namespaced JSX element name (`<a:b>`), e.g. a custom JSX pragma/alias table that produces namespaced names.","commonSituations":"Custom JSX runtime/pragma configuration that aliases component namespaces to namespaced names; extremely rare in normal TypeScript/React compiles.","solutions":["Map the identifier to an identifier or JSXMemberExpr replacement (e.g. `React.Fragment`) instead of a namespaced name","Avoid JSX namespaced names (`<ns:name>`) in code passed through identifier-replacement utilities","Upgrade swc_ecma_utils if a namespaced-name arm has been added"],"exampleFix":"// before: replacement map produces a namespaced name\nFoo => <a:b /> style JSXNamespacedName\n\n// after: replacement map produces a member expression\nFoo => JSX.Member(Foo.Bar)","handlingStrategy":"validation","validationCode":"// Before replacing identifiers in JSX, ensure no replacement maps to a namespaced name\nfor (const [from, to] of replacements) {\n  if (isJSXNamespacedName(to)) {\n    throw new Error(`Replacement for ${from} is a JSX namespaced name; unsupported`);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep identifier replacement tables to idents and member expressions","Do not introduce JSX namespaced names (<a:b>) in code processed by ident-rewriting passes","Add a regression fixture with <Foo.Bar/> JSX whenever you maintain a custom pragma rewriter"],"tags":["swc","jsx","ast-utils","identifier-replacement"],"backgroundTag":"unsupported-syntax-feature","analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}