summary refs log tree commit diff stats
path: root/tests/system/t20938.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/system/t20938.nim')
-rw-r--r--tests/system/t20938.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/system/t20938.nim b/tests/system/t20938.nim
new file mode 100644
index 000000000..7341cbb91
--- /dev/null
+++ b/tests/system/t20938.nim
@@ -0,0 +1,12 @@
+discard """
+  cmd: "nim c --mm:refc $file"
+  action: "compile"
+"""
+
+template foo(x: typed) =
+  discard x
+
+foo:
+  var x = "hello"
+  x.shallowCopy("test")
+  true