summary refs log tree commit diff stats
path: root/tests/accept
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-07-30 10:42:51 +0200
committerAraq <rumpf_a@web.de>2011-07-30 10:42:51 +0200
commit6781da5215df16602a266c33c0834eae47ede04b (patch)
treeda6a155b7dab420c5feaa7e45b42bba8ab7689cf /tests/accept
parentdce8949b9b05af3bac9d5ec0866b99ef22f78384 (diff)
downloadNim-6781da5215df16602a266c33c0834eae47ede04b.tar.gz
bugfix: forwarding of generic procs now works
Diffstat (limited to 'tests/accept')
-rw-r--r--tests/accept/compile/tforwardgeneric.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/accept/compile/tforwardgeneric.nim b/tests/accept/compile/tforwardgeneric.nim
new file mode 100644
index 000000000..84bef15cc
--- /dev/null
+++ b/tests/accept/compile/tforwardgeneric.nim
@@ -0,0 +1,11 @@
+discard """
+  output: "1.0000000000000000e+00 10"
+"""
+
+proc p[T](a, b: T): T
+
+echo p(0.9, 0.1), " ", p(9, 1)
+
+proc p[T](a, b: T): T =
+  result  = a + b
+