Describe the bug
Got an error: RuntimeError: unreachable
Input code
"use client";
export default function Hello() {
return (
<div title="����&55358;&56704;" >��</div>
);
}
Config
{
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true
},
"target": "es2024",
"loose": false,
"minify": {
"compress": false,
"mangle": false
}
},
"module": {
"type": "es6"
},
"minify": false,
"isModule": true
}
Link to the code that reproduces this issue
https://play.swc.rs/?version=1.15.26&code=H4sIAAAAAAAAA2XMwQrCMBCE4fs%2BxRBB2pOFGg2k7amCryHtFgIhKXFTCuK7G696%2BuYyv8pPxuQdB1GWiPc1JsHMyyN7wZLDJC4G3Nn7WNV4EZBYcgqoykQ3uw3ixHOvjod9NO3Nfh1N86%2FWrTaFy7U5W4Xh99CdSm0o2drSmz7AIZCMmgAAAA%3D%3D&config=H4sIAAAAAAAAA1WPSw7DIAxE9zkF8rqLKqq66B16CIs6ERE%2FYSIVRbl7CQHa7vCbGcbeBiFgYQkPseVnHjwGptDnTDjZiO9MgKRBlkH5CJemLnxIMaxUyH4KEDHMFEuIx%2Bt4qwHQzjFlPKFmqswoq6b0Wymd8YGY%2F42HFe2se%2F5sHGorGPdai1hPicnTucEdvqZW1j8Gxc%2BWLHfsH%2BoMFmcWAQAA
SWC Info output
No response
Expected behavior
The parser should:
- Support UTF-16 surrogate pairs represented as consecutive JSX entities (e.g., "��" should decode to 🦀).
- Handle invalid or unpaired surrogates gracefully without panicking.
- Return a SyntaxError instead of panicking if a numeric entity value is invalid.
Actual behavior
No response
Version
1.15.26
Additional context
No response
Describe the bug
Got an error:
RuntimeError: unreachableInput code
Config
{ "jsc": { "parser": { "syntax": "ecmascript", "jsx": true }, "target": "es2024", "loose": false, "minify": { "compress": false, "mangle": false } }, "module": { "type": "es6" }, "minify": false, "isModule": true }Link to the code that reproduces this issue
https://play.swc.rs/?version=1.15.26&code=H4sIAAAAAAAAA2XMwQrCMBCE4fs%2BxRBB2pOFGg2k7amCryHtFgIhKXFTCuK7G696%2BuYyv8pPxuQdB1GWiPc1JsHMyyN7wZLDJC4G3Nn7WNV4EZBYcgqoykQ3uw3ixHOvjod9NO3Nfh1N86%2FWrTaFy7U5W4Xh99CdSm0o2drSmz7AIZCMmgAAAA%3D%3D&config=H4sIAAAAAAAAA1WPSw7DIAxE9zkF8rqLKqq66B16CIs6ERE%2FYSIVRbl7CQHa7vCbGcbeBiFgYQkPseVnHjwGptDnTDjZiO9MgKRBlkH5CJemLnxIMaxUyH4KEDHMFEuIx%2Bt4qwHQzjFlPKFmqswoq6b0Wymd8YGY%2F42HFe2se%2F5sHGorGPdai1hPicnTucEdvqZW1j8Gxc%2BWLHfsH%2BoMFmcWAQAA
SWC Info output
No response
Expected behavior
The parser should:
Actual behavior
No response
Version
1.15.26
Additional context
No response