summary refs log tree commit diff stats
path: root/tests/js/tcodegendeclproc.nim
blob: 3acf0bc137f4904277e1067da20c3b51c27ac9e6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
discard """
  output: '''
-1
8
'''
  ccodecheck: "'console.log(-1); function fac_' \\d+ '(n_' \\d+ ')'"
"""
proc fac(n: int): int {.codegenDecl: "console.log(-1); function $2($3)".} =
  return n

echo fac(8)