mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-06 08:23:19 +08:00
An optional read tested against a one-unit literal is replaced by a test of its code unit, built from the read's receiver and index. When that receiver or index tested a held character local, as in `src[c === "a" ? pos + 1 : pos] === "b"`, the inner test was kept as it was and still compared the local as a string|undefined union while the local's binding became a number, which failed IR validation. The same held for a held local's own initializer. The receiver, index and temps of both reads are now rewritten first.