mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Adding a test for #2273
This commit is contained in:
parent
afdcdcfd54
commit
e433098eb2
1 changed files with 7 additions and 0 deletions
|
@ -246,6 +246,13 @@ test "Optimized range comprehensions.", ->
|
|||
ok exxes.join(' ') is 'x x x x x x x x x x'
|
||||
|
||||
|
||||
test "Loop variables should be able to reference outer variables", ->
|
||||
outer = 1
|
||||
do ->
|
||||
null for outer in [1, 2, 3]
|
||||
eq outer, 3
|
||||
|
||||
|
||||
test "Lenient on pure statements not trying to reach out of the closure", ->
|
||||
|
||||
val = for i in [1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue