mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Closes #970. Statements that use new are wrapped in parens to avoid the closure being used.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user