Closed Bug 350532 Opened 18 years ago Closed 12 years ago

"@[1]" should give an error at compile time, not at runtime

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
minor

Tracking

()

RESOLVED WONTFIX

People

(Reporter: BijuMailList, Unassigned)

References

Details

thanks to Jesse's fuzzer (see bug 349611 ) found following.... function (){ return @[1]; } function (){ return (@[1]).toXMLString() } 1. compiles 2. but gives error at run time Why not give "syntax error" at compile time as function (){ return @[1] } is same as function (){ return @1 } which gives "syntax error" (PS: for ineval issue see bug 350531 )
The E4X spec is based on a (buggy) Java implementation for Rhino, and if you follow it step by step, compile a big list of errata, fix those bugs, get tired, and ship it, this is what you get. It's suboptimal, but ECMA-262 does not require early error reporting. /be
Severity: normal → minor
OS: Windows XP → All
Hardware: PC → All
Summary: function (){ return (@[1]).toXMLString()} → "@[1]" should give an error at compile time, not at runtime
Blocks: e4x
E4X will be removed again from Spidermonkey (bug 788293)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.