archives

« Bugzilla Issues Index

#3574 — 12.14.5.2 Runtime Semantics: DestructuringAssignmentEvaluation


Should `{} = null` throw a TypeError? `[] = null` seems to throw. Similar: `undefined` as rhs.


Yes, I think you're right.

The reason is that I think both [ ] and { } should be considered assertions that the value that is being assigned to them is coercible to an object (and in the case of [ ], an iterable object)

Also, in 13.2.3.5

fixed in rev32 editor's draft


fixed in rev32 draft