Closed Bug 350377 Opened 19 years ago Closed 19 years ago

function () { return 3..();}

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: BijuMailList, Unassigned)

Details

by running Jesse's fuzzer (see bug 349611 ) found following.... for:- ------ function () { return 3..(<x/>); } 2 Issues -------- 1) * Compile with out syntax error * Execution gives syntax error 3) * uneval convert 3..(<x/>); to 3.(<x/>); * again uneval convert 3.(<x/>); to 3(<x/>); this also true for following function () { return 3.(<x/>); } function () { return 3(<x/>); } function () { return 3(a); } function () { return 3(''); } function () { return 3(); }
3. is a floating point literal. 3..(<x/>) is a filtering predicate operator whose left operand is 3. and whose filter expession is <x/>. The lack of an early error is allowed by ECMA-262, see Chapter 16 -- in fact it's that chapter that allows early SyntaxErrors, where the default in the spec is all at runtime. Any reason this is not INVALID? /be
Regarding "issue 1", I see a TypeError, not a SyntaxError, so it's not surprising that it happens during runtime. > 3..(<x/>) TypeError on line 1: XML filtering predicate operator called on incompatible Number Regarding "issue 3", I can't reproduce; maybe this was fixed in another bug. > function () { return 3..(<x/>); } function () { return (3).(<x/>); } > function () { return (3).(<x/>); } function () { return (3).(<x/>); }
(In reply to comment #1) > Any reason this is not INVALID? if you want to (In reply to comment #2) > Regarding "issue 1", I see a TypeError, not a SyntaxError, so it's not > surprising that it happens during runtime. right
Don't be shy about marking a bug INVALID. If you don't think it's INVALID, please say why. If you agree, no shame in so marking. Lots of bugs, valid and not ;-). /be
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.