fixes a critical codegen bug triggered by .async

This commit is contained in:
Araq 2015-09-10 08:32:39 +02:00
commit ffe51966b9
4 changed files with 72 additions and 52 deletions

View file

@ -0,0 +1,19 @@
discard """
output: "adf"
"""
import asyncdispatch
const
test = ["adf"]
proc foo() {.async.} =
for i in test:
echo(i)
var finished = false
let x = foo()
x.callback =
proc () =
finished = true
while not finished: discard