Adding a test for #1595

This commit is contained in:
Jeremy Ashkenas
2011-08-14 17:08:12 -04:00
parent 9a026e51bd
commit 8c31f2ee44

View File

@@ -88,3 +88,15 @@ test "try/catch with empty catch as last statement in a function body", ->
try nonce
catch err
eq nonce, fn()
# Catch leads to broken scoping: #1595
test "try/catch with a reused variable name.", ->
do ->
try
inner = 5
catch inner
# nothing
eq typeof inner, 'undefined'