Make explicit {.nimcall.} a seperate calling convention
This commit is contained in:
parent
ef6358f0b0
commit
38068f9778
12 changed files with 29 additions and 17 deletions
|
|
@ -1,5 +1,5 @@
|
|||
discard """
|
||||
errormsg: "type mismatch: got <proc (x: int){.gcsafe, locks: 0.}>"
|
||||
errormsg: "type mismatch: got <proc (x: int){.nimcall, gcsafe, locks: 0.}>"
|
||||
line: 12
|
||||
"""
|
||||
|
||||
|
|
|
|||
9
tests/closure/tinvalidclosure4.nim
Normal file
9
tests/closure/tinvalidclosure4.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
discard """
|
||||
errormsg: "illegal capture 'v'"
|
||||
line: 7
|
||||
"""
|
||||
|
||||
proc outer(v: int) =
|
||||
proc b {.nimcall.} = echo v
|
||||
b()
|
||||
outer(5)
|
||||
Loading…
Add table
Add a link
Reference in a new issue