mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
added a test for the multiple-functions-passed-sans-parens
This commit is contained in:
parent
3b264c9572
commit
1a97f599dd
1 changed files with 9 additions and 0 deletions
|
@ -148,3 +148,12 @@ ok result is 10
|
|||
# More paren compilation tests:
|
||||
reverse: (obj) -> obj.reverse()
|
||||
ok reverse([1, 2].concat 3).join(' ') is '3 2 1'
|
||||
|
||||
# Passing multiple functions without paren-wrapping is legal, and should compile.
|
||||
sum: (one, two) -> one() + two()
|
||||
result: sum ->
|
||||
7 + 9
|
||||
, ->
|
||||
1 + 3
|
||||
ok result is 20
|
||||
|
||||
|
|
Loading…
Reference in a new issue