Skip to content

BytecodeGenerator: emit expression info before [Symbol.iterator] get and spread - #255

Closed
robobun wants to merge 1 commit into
mainfrom
bun/fix-iterator-error-location-21134
Closed

BytecodeGenerator: emit expression info before [Symbol.iterator] get and spread#255
robobun wants to merge 1 commit into
mainfrom
bun/fix-iterator-error-location-21134

BytecodeGenerator: emit expression info before [Symbol.iterator] get …

1997f12
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 28, 2026 in 15m 53s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:6102 ObjectPatternNode::bindValue has the same misattribution bug

Annotations

Check warning on line 6102 in Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

ObjectPatternNode::bindValue has the same misattribution bug

Same problem exists in the sibling `ObjectPatternNode::bindValue` (line ~6293): `emitRequireObjectCoercibleForDestructuring` emits `OpThrowStaticError` with no preceding `emitExpressionInfo`, so `const {a} = null` after another statement still attributes the TypeError to the previous line. This is pre-existing and outside the stated `[Symbol.iterator]`/spread scope (object destructuring throws via static error, not `get_by_id`, so only line/column is wrong — no `(evaluating ...)` suffix), but si