Axel Rauschmayer (2015-01-19T20:01:31.000Z)
If I understand the spec correctly, destructuring works as follows:

```js
let {} = undefined; // OK???
let {x} = undefined; // TypeError

let [] = undefined; // TypeError
let [y] = undefined; // TypeError
```

Destructuring `undefined` (or `null`) via `{}` does not throw an exception (as per first rule inside [1]). Shouldn’t it throw one?

Thanks!

Axel


[1] https://people.mozilla.org/~jorendorff/es6-draft.html#sec-runtime-semantics-destructuringassignmentevaluation

-- 
Dr. Axel Rauschmayer
axel at rauschma.de
rauschma.de



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150119/035b2db4/attachment.html>
d at domenic.me (2015-01-20T22:03:05.758Z)
If I understand the spec correctly, destructuring works as follows:

```js
let {} = undefined; // OK???
let {x} = undefined; // TypeError

let [] = undefined; // TypeError
let [y] = undefined; // TypeError
```

Destructuring `undefined` (or `null`) via `{}` does not throw an exception (as per first rule inside [1]). Shouldn’t it throw one?

[1]: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-runtime-semantics-destructuringassignmentevaluation