summary refs log tree commit diff stats
path: root/tests/closure
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2020-08-08 12:36:20 +0200
committerClyybber <darkmine956@gmail.com>2020-08-08 12:36:20 +0200
commit38068f977843c5070667f40c199f037f9a838d7c (patch)
treeee241fe721647b24f15640165ac6880ec162a580 /tests/closure
parentef6358f0b0be71266d9fa7ae19a3b6f193b305cf (diff)
downloadNim-38068f977843c5070667f40c199f037f9a838d7c.tar.gz
Make explicit {.nimcall.} a seperate calling convention
Diffstat (limited to 'tests/closure')
-rw-r--r--tests/closure/tinvalidclosure.nim2
-rw-r--r--tests/closure/tinvalidclosure4.nim9
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/closure/tinvalidclosure.nim b/tests/closure/tinvalidclosure.nim
index b2d8bd28d..47f3f105f 100644
--- a/tests/closure/tinvalidclosure.nim
+++ b/tests/closure/tinvalidclosure.nim
@@ -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
 """
 
diff --git a/tests/closure/tinvalidclosure4.nim b/tests/closure/tinvalidclosure4.nim
new file mode 100644
index 000000000..7985a2488
--- /dev/null
+++ b/tests/closure/tinvalidclosure4.nim
@@ -0,0 +1,9 @@
+discard """
+  errormsg: "illegal capture 'v'"
+  line: 7
+"""
+
+proc outer(v: int) =
+  proc b {.nimcall.} = echo v
+  b()
+outer(5)