mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
fixing precedence order, so that you can nest range comprehensions
This commit is contained in:
11
test/fixtures/execution/test_nested_comprehensions.coffee
vendored
Normal file
11
test/fixtures/execution/test_nested_comprehensions.coffee
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
multi_liner:
|
||||
for x in [3..5]
|
||||
for y in [3..5]
|
||||
[x, y]
|
||||
|
||||
single_liner:
|
||||
[x, y] for y in [3..5] for x in [3..5]
|
||||
|
||||
print(multi_liner.length is single_liner.length)
|
||||
print(5 is multi_liner[2][2][1])
|
||||
print(5 is single_liner[2][2][1])
|
||||
Reference in New Issue
Block a user