summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-09-12 23:11:38 +0200
committerGitHub <noreply@github.com>2020-09-12 23:11:38 +0200
commit1df5cfba52ccc71e3c69b6cd7d08cebd70bbb187 (patch)
treea53c339ab154404a3d1a55a2e8679786214c8085 /tests
parent60ad95f79954fa870a124b5afc4ad5239fbebab1 (diff)
downloadNim-1df5cfba52ccc71e3c69b6cd7d08cebd70bbb187.tar.gz
fixes #15147 (#15315)
Diffstat (limited to 'tests')
-rw-r--r--tests/arc/topt_no_cursor.nim21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/arc/topt_no_cursor.nim b/tests/arc/topt_no_cursor.nim
index fe63e7585..8a33cb2ee 100644
--- a/tests/arc/topt_no_cursor.nim
+++ b/tests/arc/topt_no_cursor.nim
@@ -171,3 +171,24 @@ proc encodedQuery =
     elem.tt()
 
 encodedQuery()
+
+# bug #15147
+
+proc s(input: string): (string, string) =
+  result = (";", "")
+
+proc charmatch(input: string): (string, string) =
+  result = ("123", input[0 .. input.high])
+
+proc plus(input: string) =
+  var
+    lvalue, rvalue: string # cursors
+    lnext: string # must be cursor!!!
+    rnext: string # cursor
+  let lresult = charmatch(input)
+  (lvalue, lnext) = lresult
+
+  let rresult = s(lnext)
+  (rvalue, rnext) = rresult
+
+plus("123;")