mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
26 lines
380 B
Nim
26 lines
380 B
Nim
discard """
|
|
output: '''
|
|
finally handler 8
|
|
do not duplicate this one
|
|
'''
|
|
"""
|
|
|
|
# bug #15243
|
|
|
|
import asyncdispatch
|
|
|
|
proc f() {.async.} =
|
|
try:
|
|
while true:
|
|
try:
|
|
await sleepAsync(400)
|
|
break
|
|
finally:
|
|
var localHere = 8
|
|
echo "finally handler ", localHere
|
|
finally:
|
|
echo "do not duplicate this one"
|
|
|
|
when isMainModule:
|
|
waitFor f()
|