Files
scriptc/tests/diagnostics/string-iterator-helpers.ts
T
Chris Tate b37c9491fe Fix or refuse Node 24 builtin forms that ran with wrong output
- JavaScript calls of Promise.withResolvers' resolve/reject through the
  record no longer fail with an internal compiler error.
- new RegExp with the d or v flag is refused (SC1120) for literal flags
  and throws a named error for computed flags, instead of SyntaxError.
- JavaScript .groups reads on matches whose regex is not traceable are
  refused like TypeScript's, instead of reading undefined.
- Iterator helpers on the string iterator are refused instead of
  failing at run time.
2026-10-17 03:29:53 -05:00

4 lines
179 B
TypeScript

// The string iterator has no iterator-helper lowering; the call is
// refused instead of failing at run time.
const upper = "abc"[Symbol.iterator]().map((c) => c.toUpperCase());