Files
scriptc/tests/diagnostics/regex-checker.ts
2026-07-22 18:08:04 -05:00

6 lines
296 B
TypeScript

// Checker-level regex fences: function replacements — tsc rejects them
// before lowering starts. (exec lowers through the match intrinsic and
// `new RegExp(pattern, flags)` compiles now, so neither appears here.)
const m = /a(b)/.exec("ab");
const fn = "abc".replace(/b/, (s: string) => s);