diff --git a/test/test_functions.coffee b/test/test_functions.coffee index 78ff4bfe..193839c6 100644 --- a/test/test_functions.coffee +++ b/test/test_functions.coffee @@ -369,11 +369,11 @@ new Foo().bar([101]...) eq x, 101 -# Issue #904: Destructuring function arguments with same-named variables in scope. -key for key, value of a: 1 -f = ([key, value]) -> - key + value - -eq f([10, 11]), 21 -eq key, 'a' -eq value, 1 \ No newline at end of file +test "#904: Destructuring function arguments with same-named variables in scope", -> + a = b = nonce = {} + fn = ([a,b]) -> {a:a,b:b} + result = fn([c={},d={}]) + eq c, result.a + eq d, result.b + eq nonce, a + eq nonce, b