archives

« Bugzilla Issues Index

#3992 — new early errors should be SyntaxError, not ReferenceError


There are a number of places where the spec produces new early errors, which are sometimes SyntaxErrors and sometimes ReferenceErrors. In particular failed checks for IsValidSimpleAssignmentTarget are inconsistent about which type of error they produce.

My suggestion is that we stick with SyntaxError since that's seen as the early error type. We may not be able to be 100% consistent about that, if ES5 already mandates some early ReferenceErrors, but I believe SyntaxError matches expectations better.


see last item in first bullet list of http://www.ecma-international.org/ecma-262/5.1/#sec-16. That was the ES5 equivalent of isValidSimpleAssignment.
ES3 also had more or less that same language in its use 16

It's PutValue that throws a ReferenceError in those cases, hence the origin or "early ReferenceError"


I checked and the only early Reference Errors I could find are the ones that are carry overs from ES3/5.

So fixed there were any others they are now gone.

Sp...

fixed in rev34 editor's draft


fixed in rev34