mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Fixes #2555
This commit is contained in:
@@ -427,3 +427,14 @@ test "Throw should be usable as an expression.", ->
|
||||
throw new Error 'failed'
|
||||
catch e
|
||||
ok e is 'up'
|
||||
|
||||
|
||||
test "#2555, strange function if bodies", ->
|
||||
success = -> ok true
|
||||
failure = -> ok false
|
||||
|
||||
success() if do ->
|
||||
yes
|
||||
|
||||
failure() if try
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user