tinvalidclosure2.nim 170 B

123456789101112131415
  1. discard """
  2. errormsg: "illegal capture 'A'"
  3. line: 10
  4. """
  5. proc outer() =
  6. var A: int
  7. proc ugh[T](x: T) {.cdecl.} =
  8. echo "ugha", A, x
  9. ugh[int](12)
  10. outer()