jashkenas/coffee-script — Issue #2138: Conditional assignment fails with object literals
Author: jussiry
Created: 2012-02-25 09:39:10+00:00
State: open

```coffeescript
foo ?=
bar: true
baz: false
```

compiles quite unexpectedly to:

```javascript
if (typeof foo === "undefined" || foo === null) {
foo = {
bar: true
};
}
({
baz: false
});
```

Adding parenthesis makes it work again, but since normal assignment works also without parenthesis this can easily result in strange errors in code.