"TypeError: var x is undefined" with for each, Iterator()

RESOLVED DUPLICATE of bug 420837

Status

()

--
minor
RESOLVED DUPLICATE of bug 420837
10 years ago
7 years ago

People

(Reporter: jruderman, Unassigned)

Tracking

(Blocks: 1 bug, {testcase})

Trunk
x86
macOS
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
for each (var x in [void 0]) { Iterator(); }

Result:
  TypeError: var x is undefined

Expected:
  TypeError: (void 0) is undefined
or:
  TypeError: missing argument 0 when calling function Iterator

A recent addition to jsfunfuzz caught this bug: it now checks the validity of expressions that appear in certain error messages.  "(var x)" is not a valid expression.

Strange that the value of |x| influences an error message that should have nothing to do with |x|.
With a current js shell:

js> for each (var x in [void 0]) { Iterator(); }
typein:10: TypeError: Iterator is undefined
(Reporter)

Updated

7 years ago
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 420837
You need to log in before you can comment on or make changes to this bug.