diff options
author | Oleh Prypin <blaxpirit@gmail.com> | 2015-04-09 04:19:00 +0300 |
---|---|---|
committer | Oleh Prypin <blaxpirit@gmail.com> | 2015-04-09 04:21:50 +0300 |
commit | 57250ad2819a14ccbe325f33d6afcd06dd18ea35 (patch) | |
tree | a0f560bde98fc37a3b8e0aa917bcd1ab2e158a59 | |
parent | b48f9c4e1440b28fedddec4833553e8f60648ec4 (diff) | |
download | Nim-57250ad2819a14ccbe325f33d6afcd06dd18ea35.tar.gz |
Test JS proc header codegen
-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) |