mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
just fixing a single test in test_functions.coffee for now, so I don't
forget my suggested fix
This commit is contained in:
parent
5de43fca4e
commit
b02a1ee037
1 changed files with 8 additions and 8 deletions
|
@ -369,11 +369,11 @@ new Foo().bar([101]...)
|
||||||
eq x, 101
|
eq x, 101
|
||||||
|
|
||||||
|
|
||||||
# Issue #904: Destructuring function arguments with same-named variables in scope.
|
test "#904: Destructuring function arguments with same-named variables in scope", ->
|
||||||
key for key, value of a: 1
|
a = b = nonce = {}
|
||||||
f = ([key, value]) ->
|
fn = ([a,b]) -> {a:a,b:b}
|
||||||
key + value
|
result = fn([c={},d={}])
|
||||||
|
eq c, result.a
|
||||||
eq f([10, 11]), 21
|
eq d, result.b
|
||||||
eq key, 'a'
|
eq nonce, a
|
||||||
eq value, 1
|
eq nonce, b
|
||||||
|
|
Loading…
Reference in a new issue