summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/system/arc.nim2
-rw-r--r--tests/destructor/tbintree2.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/arc.nim b/lib/system/arc.nim
index 9ee367543..7f533089c 100644
--- a/lib/system/arc.nim
+++ b/lib/system/arc.nim
@@ -163,7 +163,7 @@ proc nimRawDispose(p: pointer, alignment: int) {.compilerRtl.} =
       let hdrSize = align(sizeof(RefHeader), alignment)
       alignedDealloc(p -! hdrSize, alignment)
 
-template dispose*[T](x: owned(ref T)) = nimRawDispose(cast[pointer](x), T.alignOf)
+template `=dispose`*[T](x: owned(ref T)) = nimRawDispose(cast[pointer](x), T.alignOf)
 #proc dispose*(x: pointer) = nimRawDispose(x)
 
 proc nimDestroyAndDispose(p: pointer) {.compilerRtl, raises: [].} =
diff --git a/tests/destructor/tbintree2.nim b/tests/destructor/tbintree2.nim
index 6fdda6e54..0bc52457c 100644
--- a/tests/destructor/tbintree2.nim
+++ b/tests/destructor/tbintree2.nim
@@ -57,7 +57,7 @@ proc `=destroy`(t: var Tree) {.nodestroy.} =
     let x = s.pop
     if x.left != nil: s.add(x.left)
     if x.right != nil: s.add(x.right)
-    dispose(x)
+    `=dispose`(x)
   `=destroy`(s)
 
 proc hasValue(self: var Tree, x: int32): bool =