diff --git a/results.nim b/results.nim index 9f8445a..1cb516f 100644 --- a/results.nim +++ b/results.nim @@ -377,12 +377,17 @@ const resultsGenericsOpenSymWorkaroundHint* {.booldefine.} = true - resultsLent {.booldefine.} = (NimMajor, NimMinor, NimPatch) >= (2, 0, 8) + resultsLent {.booldefine.} = + (NimMajor, NimMinor, NimPatch) >= (2, 2, 0) or + (defined(gcRefc) and ((NimMajor, NimMinor, NimPatch) >= (2, 0, 8))) ## Enable return of `lent` types - this *mostly* works in Nim 1.6.18+ but ## there have been edge cases reported as late as 1.6.14 - YMMV - ## conservatively, `lent` is therefore enabled only with the latest Nim ## version at the time of writing, where it could be verified to work with ## several large applications. + ## + ## ORC is not expected to work until 2.2. + ## https://github.com/nim-lang/Nim/issues/23973 when resultsLent: template maybeLent(T: untyped): untyped =