diff options
author | Araq <rumpf_a@web.de> | 2011-07-30 10:42:51 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-07-30 10:42:51 +0200 |
commit | 6781da5215df16602a266c33c0834eae47ede04b (patch) | |
tree | da6a155b7dab420c5feaa7e45b42bba8ab7689cf /tests/accept | |
parent | dce8949b9b05af3bac9d5ec0866b99ef22f78384 (diff) | |
download | Nim-6781da5215df16602a266c33c0834eae47ede04b.tar.gz |
bugfix: forwarding of generic procs now works
Diffstat (limited to 'tests/accept')
-rw-r--r-- | tests/accept/compile/tforwardgeneric.nim | 11 |
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 + |