Closed cheatfate closed 1 year ago
import chronos proc testFoo1(): Future[int] {.async.} = result = 3 proc testFoo2(): Future[int] {.async.} = return 3 proc testFoo3(): Future[int] {.async.} = 3 when isMainModule: echo waitFor(testFoo3())
This program generates compilation warning
nim-chronos\chronos\asyncmacro2.nim(180, 44) Hint: 'result' is declared but not used [XDeclaredButNotUsed]
testFoo1() and testFoo2() do not generate warnings.
testFoo1()
testFoo2()
Related PR https://github.com/status-im/nim-chronos/pull/401
cc @arnetheduck
This program generates compilation warning
testFoo1()
andtestFoo2()
do not generate warnings.Related PR https://github.com/status-im/nim-chronos/pull/401
cc @arnetheduck