diff options
Diffstat (limited to 'tests')
-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 + |