jashkenas/coffee-script — Issue #1805: `new Thing param` compiles incorrectly
Author: passcod
Created: 2011-10-26 16:30:13+00:00
State: open

See [this question on Stack Overflow](http://stackoverflow.com/questions/7898820/whats-the-difference-between-new-thingparam-and-newthingparam):

CS compiles `new Thing param` to `new(Thing(param))` which fails when `Thing` does not return a constructor. The correct form to compile to is either `new Thing(param)` or `new(Thing)(param)`.

A workaround is to write `new Thing param` as `new(Thing)(param)`.