Files
scriptc/tests
Malte UblandClaude Opus 5.5 836a58b912 Give require declarators beside other declarators no storage
A top-level var statement that mixes require() declarators with other
bindings, the shape bundlers emit (`var EventEmitter = require("events"),
Base = class extends EventEmitter {}`), registered a module global for each
require declarator, because the whole-statement skip only applied when every
declarator was a require. The statement lowering treats each require
declarator as alias plumbing and never assigns it, so a read that resolved
to that global saw null: `new EventEmitter` in a class constructor called
through a null class object and crashed with SIGSEGV. A builtin require in a
nested block (`if (c) { var fs = require("fs"); }`) had the same mismatch.

Collection now skips storage for each such declarator, with the same
registrations a whole require statement makes, so reads resolve to the
module as they do for a statement of requires only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 11:17:15 -07:00
..
2026-10-20 11:36:33 -05:00
…
2026-10-20 13:02:01 -05:00