Module-init code is lowered with is_strict_fn: false even for an ESM, which is always strict (crates/perry-codegen/src/codegen/entry.rs:825 and :1537; deliberate per entry_outline.rs:677).
It happens not to bite #9394 because a[i] = v lowers to Expr::PutValueSet, which carries the real ctx.current_strict. But any Expr::IndexSet produced by a different lowering — for heads, destructuring — reads the wrong strictness at module top level, so a rejected write there will silently no-op in code that is specified to throw.
No end-to-end reproducer yet; this is a latent correctness hazard found by reading the strictness plumbing while fixing #9394, and it is filed so the next person touching module-init lowering knows the flag is not trustworthy there.
Worth pairing with #(the strict ordinary-object write issue filed alongside this one), since both are about strictness not reaching a store site.
Module-init code is lowered with
is_strict_fn: falseeven for an ESM, which is always strict (crates/perry-codegen/src/codegen/entry.rs:825and:1537; deliberate perentry_outline.rs:677).It happens not to bite #9394 because
a[i] = vlowers toExpr::PutValueSet, which carries the realctx.current_strict. But anyExpr::IndexSetproduced by a different lowering —forheads, destructuring — reads the wrong strictness at module top level, so a rejected write there will silently no-op in code that is specified to throw.No end-to-end reproducer yet; this is a latent correctness hazard found by reading the strictness plumbing while fixing #9394, and it is filed so the next person touching module-init lowering knows the flag is not trustworthy there.
Worth pairing with #(the strict ordinary-object write issue filed alongside this one), since both are about strictness not reaching a store site.