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-19 21:17:25 +0800
committerGitHub <noreply@github.com>2024-09-19 15:17:25 +0200
commit755307be61e4ee7b32c8354b2c303d04bdfc3a3e (patch)
treec7f05dc59ec5e9f8e546b90207dc2e337282b7fc /tests/arc
parent05a7a48a2bcc21c772bd35703fa52e374d25febe (diff)
downloadNim-755307be61e4ee7b32c8354b2c303d04bdfc3a3e.tar.gz
fixes #24141; Calling algorithm reverse causes a SIGSEGV on ORC (#24142)
fixes #24141
Diffstat (limited to 'tests/arc')
-rw-r--r--tests/arc/tarcmisc.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/arc/tarcmisc.nim b/tests/arc/tarcmisc.nim
index 49f1b80ce..b4476ef4f 100644
--- a/tests/arc/tarcmisc.nim
+++ b/tests/arc/tarcmisc.nim
@@ -820,3 +820,17 @@ block: # bug #23973
     doAssert t == a
 
   n()
+
+block: # bug #24141
+  func reverse(s: var openArray[char]) =
+    s[0] = 'f'
+
+  func rev(s: var string) =
+    s.reverse
+
+  proc main =
+    var abc = "abc"
+    abc.rev
+    doAssert abc == "fbc"
+
+  main()