diff options
author | Araq <rumpf_a@web.de> | 2011-07-21 00:57:39 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-07-21 00:57:39 +0200 |
commit | 569c1ce5ec7cedd2c28d3272aae92062638cad0d (patch) | |
tree | 835e4667fd6efcda72fe878982ec01eeb4ae92af /tests/accept | |
parent | 81a917390bdb61d07310c8faf31092f65acbfb53 (diff) | |
download | Nim-569c1ce5ec7cedd2c28d3272aae92062638cad0d.tar.gz |
bugfix: proper cache for generic instantiations
Diffstat (limited to 'tests/accept')
-rw-r--r-- | tests/accept/run/tgenericprocvar.nim | 19 |
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]() + |