summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-04-09 09:37:45 +0200
committerAndreas Rumpf <rumpf_a@web.de>2015-04-09 09:37:45 +0200
commit4d0ee66f29cf487cc848a3f4f0f672e2cb0aa3c7 (patch)
treeb88ebb0e5d4d0722f70f62edb1a8a41660e0a865 /tests
parentfdadc177d49a7384436d5dce773ef9630fda90e7 (diff)
parent1d7fc5fcdaa0e16ac6583709248ba4635129807b (diff)
downloadNim-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.nim11
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)