jashkenas/coffee-script — Issue #2051: object creation with conditional property first
Author: davidmba
Created: 2012-01-18 00:09:41+00:00
State: open

# working

```
alert
val: "hello"
val2: "all good"
val3: "works" if true
```
compiles correctly to

```javascript

alert({
val: "hello",
val2: "all good",
val3: true ? "works" : void 0
});
```

# incorrect compilation

```
alert
val3: "works" if true
val: "hello"
val2: "all good"
```
compiles incorrectly to

```javascript

alert(true ? {
val3: "works"
} : void 0, {
val: "hello",
val2: "all good"
});
```