ORC: cursor inference bugfix (#17973)
* fixed a .cursor inference bug * added a test case
This commit is contained in:
parent
38b41f893a
commit
c14427dbf3
3 changed files with 50 additions and 5 deletions
|
|
@ -362,9 +362,9 @@ proc read*[T](future: Future[T] | FutureVar[T]): T =
|
|||
##
|
||||
## If the result of the future is an error then that error will be raised.
|
||||
when future is Future[T]:
|
||||
let fut = future
|
||||
let fut {.cursor.} = future
|
||||
else:
|
||||
let fut = Future[T](future)
|
||||
let fut {.cursor.} = Future[T](future)
|
||||
if fut.finished:
|
||||
if fut.error != nil:
|
||||
injectStacktrace(fut)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue