Test JS proc header codegen

This commit is contained in:
Oleh Prypin
2015-04-09 04:19:00 +03:00
parent b48f9c4e14
commit 57250ad281

View File

@@ -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)