correct effect tracking for .borrowed procs [backport] (#18882)
* correct effect tracking for .borrowed procs [backport] * progress * fix error message in a test * correctly fix it Co-authored-by: narimiran <narimiran@disroot.org>
This commit is contained in:
parent
7d2a4c0880
commit
90a2b5afd8
8 changed files with 20 additions and 12 deletions
|
|
@ -2453,7 +2453,7 @@ when notJSnotNims:
|
|||
else:
|
||||
{.error: "Only closure function and iterator are allowed!".}
|
||||
|
||||
proc finished*[T: proc](x: T): bool {.noSideEffect, inline.} =
|
||||
proc finished*[T: proc](x: T): bool {.noSideEffect, inline, magic: "Finished".} =
|
||||
## It can be used to determine if a first class iterator has finished.
|
||||
when T is "iterator":
|
||||
{.emit: """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue