diff options
Diffstat (limited to 'tests/accept/run/tgenericprocvar.nim')
-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]() + |