summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/types/t7905.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/types/t7905.nim b/tests/types/t7905.nim
index ddb371039..ef75bb86c 100644
--- a/tests/types/t7905.nim
+++ b/tests/types/t7905.nim
@@ -2,6 +2,8 @@ discard """
   output: '''
 (member: "hello world")
 (member: 123.456)
+(member: "hello world", x: ...)
+(member: 123.456, x: ...)
 '''
 """
 
@@ -16,3 +18,16 @@ template foobar(arg: typed): untyped =
 
 foobar("hello world")
 foobar(123.456'f64)
+
+template foobarRec(arg: typed): untyped =
+  type
+    MyType = object
+      member: type(arg)
+      x: ref MyType
+
+  var myVar: MyType
+  myVar.member = arg
+  echo myVar
+
+foobarRec("hello world")
+foobarRec(123.456'f64)