Closes #970. Statements that use new are wrapped in parens to avoid the closure being used.

This commit is contained in:
Timothy Jones
2011-01-22 23:11:00 +13:00
parent 18a1e01d64
commit dc6bd715b2
3 changed files with 9 additions and 0 deletions

View File

@@ -364,3 +364,8 @@ test "don't wrap \"pure\" statements in a closure", ->
for item in items
return item if item is nonce
eq nonce, fn items
#### Unusual `new` Usage
test "usage of `new` is careful about where the invocation parens end up", ->
ok 'object' is typeof new try Array