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







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

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

outer("abc")