summary refs log tree commit diff stats
path: root/tests/arc
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2024-09-22 19:51:51 +0800
committerGitHub <noreply@github.com>2024-09-22 13:51:51 +0200
commit5c843d3d60982bb0669107ee67863737f52574ba (patch)
treeb185885362f864d000578ff72c6de252fc51c071 /tests/arc
parenta1777200c1a52b5a71d641309349618df2550b33 (diff)
downloadNim-5c843d3d60982bb0669107ee67863737f52574ba.tar.gz
fixes #24147; Copy hook causes an incompatible-pointer-types (#24149)
fixes #24147
Diffstat (limited to 'tests/arc')
-rw-r--r--tests/arc/tarc_orc.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/arc/tarc_orc.nim b/tests/arc/tarc_orc.nim
index 0e6208b4a..f2c7de2fc 100644
--- a/tests/arc/tarc_orc.nim
+++ b/tests/arc/tarc_orc.nim
@@ -171,3 +171,16 @@ block: # bug #23858
     return Object()
   discard fn()
   doAssert x == 1
+
+block: # bug #24147
+  type
+    O = object of RootObj
+      val: string
+    OO = object of O
+
+  proc `=copy`(dest: var O, src: O) =
+      dest.val = src.val
+
+  let oo = OO(val: "hello world")
+  var ooCopy : OO
+  `=copy`(ooCopy, oo)