diff --git a/crates/swc_ecma_minifier/tests/compress/fixture/next/36127/2/input.js b/crates/swc_ecma_minifier/tests/compress/fixture/next/36127/2/input.js new file mode 100644 index 000000000000..e37927aca72b --- /dev/null +++ b/crates/swc_ecma_minifier/tests/compress/fixture/next/36127/2/input.js @@ -0,0 +1,19 @@ +/** + * Create a code check from a regex. + * + * @param {RegExp} regex + * @returns {(code: Code) => code is number} + */ +function regexCheck(regex) { + return check + + /** + * Check whether a code matches the bound regex. + * + * @param {Code} code Character code + * @returns {code is number} Whether the character code matches the bound regex + */ + function check(code) { + return code !== null && regex.test(String.fromCharCode(code)) + } +} \ No newline at end of file