diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2015-04-09 09:37:45 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2015-04-09 09:37:45 +0200 |
commit | 4d0ee66f29cf487cc848a3f4f0f672e2cb0aa3c7 (patch) | |
tree | b88ebb0e5d4d0722f70f62edb1a8a41660e0a865 /tests | |
parent | fdadc177d49a7384436d5dce773ef9630fda90e7 (diff) | |
parent | 1d7fc5fcdaa0e16ac6583709248ba4635129807b (diff) | |
download | Nim-4d0ee66f29cf487cc848a3f4f0f672e2cb0aa3c7.tar.gz |
Merge pull request #2496 from BlaXpirit/js-header-comma
Fix JS codegen: proc header with compiletime arguments
Diffstat (limited to 'tests')
-rw-r--r-- | tests/js/test2.nim | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/js/test2.nim b/tests/js/test2.nim index 5a734358c..1a42fbfda 100644 --- a/tests/js/test2.nim +++ b/tests/js/test2.nim @@ -1,6 +1,7 @@ discard """ output: '''foo -js 3.14''' +js 3.14 +7''' """ # This file tests the JavaScript generator @@ -20,3 +21,11 @@ else: proc foo(val: float): string = "js " & $val echo foo(3.14) + +# #2495 +type C = concept x + +proc test(x: C, T: typedesc): T = + cast[T](x) + +echo 7.test(int8) |