tcodegendeclproc.nim 214 B

123456789101112
  1. discard """
  2. output: '''
  3. -1
  4. 8
  5. '''
  6. ccodecheck: "'console.log(-1); function fac__tcodegendeclproc_u1(n_p0)'"
  7. """
  8. proc fac(n: int): int {.codegenDecl: "console.log(-1); function $2($3)".} =
  9. return n
  10. echo fac(8)