diff options
Diffstat (limited to 'tests/ccgbugs/twrong_string_asgn.nim')
-rw-r--r-- | tests/ccgbugs/twrong_string_asgn.nim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ccgbugs/twrong_string_asgn.nim b/tests/ccgbugs/twrong_string_asgn.nim new file mode 100644 index 000000000..669b7f8f5 --- /dev/null +++ b/tests/ccgbugs/twrong_string_asgn.nim @@ -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: poll() |