Files
scriptc/tests
Chris Tateandejc3 e41858c7df Compile assignment and update targets wrapped in parentheses or non-null assertions
TypeScript accepts parentheses and non-null assertions around the
reference an assignment, a `++`/`--` update or a for-in/of head writes
(`(x) = 1`, `h.sums[k]! += 10`), and both are erased at run time. The
compiler now reads its source files with the AstFile writeTargets option:
the writer's `left`, `operand` or `initializer` is the reference itself
and the reference's `parent` is the writer, so lowering and every analysis
of a binding's or member's writes see one shape. The reference keeps its
own source span. Files read without the option, such as type nodes from
the checker and the AST conformance tests, keep TypeScript's exact tree.

Fixes #1625

Co-authored-by: ejc3 <1694850+ejc3@users.noreply.github.com>
2026-10-21 08:58:51 -05:00
..
…
2026-10-20 17:56:44 -05:00