summary refs log blame commit diff stats
path: root/tests/closure/tinvalidclosure3.nim
blob: 31c4976f880272ca209d14a4ba75631fcea237b3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                 
discard """
  line: 9
  errormsg: "illegal capture 'x'"
"""

proc outer(arg: string) =
  var x = 0
  proc inner {.inline.} =
    echo "inner", x
  inner()

outer("abc")