jashkenas/coffee-script — Issue #1961: syntax regression with soak assignements in 1.2.0
Author: vincentcr
Created: 2011-12-21 23:20:53+00:00
State: open

a combination of:

* obj ?= # object declaration
* and: foo = # other object declaration

makes the first declaration only take the first member.

Example:

```
create = ->
obj ?=
x: 1
y: 2
obj

foo =
bar: ->

console.log 'created:', create()
```

this outputs:

```
created: { x: 1 }
```

javascript (note the part with y:2):

```
(function() {
var create, foo;

create = function() {
if (typeof obj === "undefined" || obj === null) {
obj = {
x: 1
};
}
({
y: 2
});
return obj;
};

foo = {
bar: function() {}
};

console.log('created:', create());

}).call(this);

```