summary refs log tree commit diff stats
path: root/tests/closure/tinvalidclosure2.nim
blob: 84555930988654abadc828ac97021cbf790cbfea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
discard """
  line: 10
  errormsg: "illegal capture 'A'"
"""

proc outer() =
  var A: int

  proc ugh[T](x: T) {.cdecl.} =
    echo "ugha", A, x

  ugh[int](12)

outer()