more bugfixes for closures
This commit is contained in:
parent
991b3096e8
commit
5e570bae47
3 changed files with 20 additions and 5 deletions
14
tests/reject/tinvalidclosure2.nim
Normal file
14
tests/reject/tinvalidclosure2.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
discard """
|
||||
line: 10
|
||||
errormsg: "invalid capture: 'A'"
|
||||
"""
|
||||
|
||||
proc outer() =
|
||||
var A: int
|
||||
|
||||
proc ugh[T](x: T) {.cdecl.} =
|
||||
echo "ugha", A, x
|
||||
|
||||
ugh[int](12)
|
||||
|
||||
outer()
|
||||
Loading…
Add table
Add a link
Reference in a new issue