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

proc outer() =
  var A: int

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

  ugh[int](12)

outer()