This commit is contained in:
Araq
2014-08-20 02:14:30 +02:00
parent bc2e83fe17
commit 15b2d6d351
2 changed files with 77 additions and 29 deletions

View File

@@ -0,0 +1,33 @@
discard """
output: '''10'''
"""
var
x = false
run = true
while run:
run = false
block myblock:
if true:
break
echo "leaving myblock"
x = true
doAssert(x)
# bug #1418
iterator foo: int =
for x in 0 .. 9:
for y in [10,20,30,40,50,60,70,80,90]:
yield x + y
for p in foo():
echo p
break
iterator permutations: int =
yield 10
for p in permutations():
break