Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2dc2d16

Browse files
committed
variadic arguments breaking out of scope (test)
1 parent 56b2b02 commit 2dc2d16

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/scope.coffee

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,9 @@ test "assignment to an Object.prototype-named variable should not leak to outer
2020
constructor = 'word'
2121
)()
2222
ok constructor isnt 'word'
23+
24+
test "siblings of variadic arguments shouldn't break out.", ->
25+
x = 10
26+
oops = (x,args...) ->
27+
oops(20, 1,2,3)
28+
eq x, 10

0 commit comments

Comments
 (0)