summary refs log tree commit diff stats
path: root/tests/parallel/tsysspawn.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/parallel/tsysspawn.nim')
-rw-r--r--tests/parallel/tsysspawn.nim37
1 files changed, 35 insertions, 2 deletions
diff --git a/tests/parallel/tsysspawn.nim b/tests/parallel/tsysspawn.nim
index 7244a5ee6..b7ecd1264 100644
--- a/tests/parallel/tsysspawn.nim
+++ b/tests/parallel/tsysspawn.nim
@@ -1,7 +1,11 @@
 discard """
   output: '''4
-8'''
-  cmd: "nim $target --threads:on $options $file"
+8
+(a: 1)
+2
+2
+'''
+  matrix: "--mm:refc"
 """
 
 import threadpool
@@ -29,3 +33,32 @@ sync()
 
 echo x
 echo y
+
+
+#--------------------------------------------------------
+# issue #14014
+
+import threadpool
+
+type A = object
+    a: int
+
+proc f(t: typedesc): t =
+  t(a:1)
+
+let r = spawn f(A)
+echo ^r
+
+proc f2(x: static[int]): int =
+  x
+
+let r2 = spawn f2(2)
+echo ^r2
+
+type statint = static[int]
+
+proc f3(x: statint): int =
+  x
+
+let r3 = spawn f3(2)
+echo ^r3