Merge pull request #2496 from BlaXpirit/js-header-comma
Fix JS codegen: proc header with compiletime arguments
This commit is contained in:
commit
4d0ee66f29
2 changed files with 11 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue