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
|
@ -244,6 +244,13 @@ test "Optimized range comprehensions.", ->
|
||||||
|
|
||||||
exxes = ('x' for [0...10])
|
exxes = ('x' for [0...10])
|
||||||
ok exxes.join(' ') is 'x x x x x x x x x x'
|
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", ->
|
test "Lenient on pure statements not trying to reach out of the closure", ->
|
||||||
|
|
Loading…
Reference in a new issue