jashkenas/coffee-script — Issue #1802: Destructured assignment with splats into an object property leads to a syntax error
Author: barn3y
Created: 2011-10-25 03:58:50+00:00
State: open

```js
class Thing
func: ->
[@a, @b...] = [1,2,3]

(new Thing).func()
```

When run, the code above results in a JS syntax error:

```
.:7
var this.b, _ref;
^^^^
SyntaxError: Unexpected token this
at Module._compile (module.js:414:25)
at Object.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script.js:57:25)
at /usr/local/lib/node_modules/coffee-script/lib/command.js:147:29
at Socket. (/usr/local/lib/node_modules/coffee-script/lib/command.js:181:14)
at Socket.emit (events.js:64:17)
at Socket._onReadable (net_legacy.js:658:51)
at IOWatcher.onReadable [as callback] (net_legacy.js:177:10)
```