Files
vectorcraft/crates/scriptcheck
dotCooCoo cd36c78004 Scripts: a method changed through a computed key, an operator or another name ends the own-method exemption
The declarations pass recorded a function body or loop replacing a
variable's document write method only for `local.saveAs = ...` and
`local['saveAs'] = ...`. A hoisted function or a later loop pass could
still change the method through a compound or update operator
(`local.saveAs += w`, `local['saveAs']++`), or hold the object under
another name (`var y = local; y.saveAs = w`, `give(local)`), and an
earlier `local.saveAs(f)` kept its exemption.

The pass now reads these the way the main pass reads them: any compound
or update operator on a write method, `++local.saveAs`, a key in brackets
that is not one string or number literal, `delete local`, and the
variable used as a value. Each recorded replacement is kept by the body
that declares the variable, so a function's own variable of the same name
keeps its exemption.
2026-12-04 01:18:12 -08:00
..