diff options
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim index 23f9227c3..82980d9da 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -1744,7 +1744,7 @@ proc swap*[T](a, b: var T) {.magic: "Swap", noSideEffect.} ## swaps the values `a` and `b`. This is often more efficient than ## ``tmp = a; a = b; b = tmp``. Particularly useful for sorting algorithms. -when not defined(js) and not defined(booting): +when not defined(js) and not defined(booting) and defined(nimTrMacros): template swapRefsInArray*{swap(arr[a], arr[b])}(arr: openarray[ref], a, b: int) = # Optimize swapping of array elements if they are refs. Default swap # implementation will cause unsureAsgnRef to be emitted which causes |