You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import chronos
funcfoo*[T](future: Future[T].Raising([])): bool=falsewhenisMainModule:
let resFut =Future[void].Raising([CancelledError]).init()
echofoo(resFut)
It will generate an error:
testraisesarg.nim(3, 31) Error: type mismatch: got <typedesc[Future[foo.T]], array[0..-1, empty]>
but expected one of:
macro Raising[T](F: typedesc[Future[T]]; E: typed): untyped
first type mismatch at position: 1
required type for F: typedesc[Future[Raising.T]]
but expression 'Future[T]' is of type: typedesc[Future[foo.T]]
expression: Raising(Future[T], [])
In such way it become impossible to work with Futures as arguments.
The text was updated successfully, but these errors were encountered:
Following example is impossible to compile
It will generate an error:
In such way it become impossible to work with Futures as arguments.
The text was updated successfully, but these errors were encountered: