summary refs log tree commit diff stats
path: root/tests/accept
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-07-21 00:57:39 +0200
committerAraq <rumpf_a@web.de>2011-07-21 00:57:39 +0200
commit569c1ce5ec7cedd2c28d3272aae92062638cad0d (patch)
tree835e4667fd6efcda72fe878982ec01eeb4ae92af /tests/accept
parent81a917390bdb61d07310c8faf31092f65acbfb53 (diff)
downloadNim-569c1ce5ec7cedd2c28d3272aae92062638cad0d.tar.gz
bugfix: proper cache for generic instantiations
Diffstat (limited to 'tests/accept')
-rw-r--r--tests/accept/run/tgenericprocvar.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/accept/run/tgenericprocvar.nim b/tests/accept/run/tgenericprocvar.nim
new file mode 100644
index 000000000..7fdc58ca4
--- /dev/null
+++ b/tests/accept/run/tgenericprocvar.nim
@@ -0,0 +1,19 @@
+discard """
+  output: "0false"
+"""
+
+# Test multiple generic instantiation of generic proc vars:
+
+proc threadProcWrapper[TMsg]() =
+  var x: TMsg
+  stdout.write($x)
+
+#var x = threadProcWrapper[int]
+#x()
+
+#var y = threadProcWrapper[bool]
+#y()
+
+threadProcWrapper[int]()
+threadProcWrapper[bool]()
+