Destructuring object outside of var declaration

Jeff Walden jwalden+es at
Wed Dec 14 20:55:46 UTC 2016

On 11/13/2016 12:33 PM, Isiah Meadows wrote:
> Okay. Is it a spec bug then? Throwing a ReferenceError is surprising and odd IMHO.

I think so -- having different sorts of early errors makes it a little less clear what sort of error should be thrown when two early errors of different types are in the same script.  Last I knew, the spec was basically just waiting on someone to experiment with pulling the trigger to make everything a SyntaxError.  I've been meaning to do that for awhile, but it's not a high priority.


More information about the es-discuss mailing list