summary refs log tree commit diff stats
path: root/tests/arc/tarcmisc.nim
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2020-05-06 23:13:59 +0100
committerGitHub <noreply@github.com>2020-05-07 00:13:59 +0200
commit0d8507cd3da4f8c5ec3d7a627bb2c8918ff804c8 (patch)
treea18e5cc31befee0e9e087a62089e3da5a9a890b9 /tests/arc/tarcmisc.nim
parent6dba06f9e63083d4cbcd09b10aaf2342b70821b0 (diff)
downloadNim-0d8507cd3da4f8c5ec3d7a627bb2c8918ff804c8.tar.gz
fix #14236 (#14250)
Co-authored-by: cooldome <ariabushenko@bk.ru>
Diffstat (limited to 'tests/arc/tarcmisc.nim')
-rw-r--r--tests/arc/tarcmisc.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/arc/tarcmisc.nim b/tests/arc/tarcmisc.nim
index c0583a640..953e2f3a7 100644
--- a/tests/arc/tarcmisc.nim
+++ b/tests/arc/tarcmisc.nim
@@ -89,3 +89,19 @@ let
 
 assert n.sortedByIt(it) == @["b", "c"], "fine"
 assert q.sortedByIt(it[0]) == @[("b", "1"), ("c", "2")], "fails under arc"
+
+
+#------------------------------------------------------------------------------
+# issue #14236
+
+type
+  MyType = object
+    a: seq[int]
+
+proc re(x: static[string]): static MyType = 
+  MyType()
+
+proc match(inp: string, rg: static MyType) = 
+  doAssert rg.a.len == 0
+
+match("ac", re"a(b|c)")
\ No newline at end of file