summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorhlaaftana <10591326+hlaaftana@users.noreply.github.com>2021-02-09 16:23:06 +0300
committerGitHub <noreply@github.com>2021-02-09 14:23:06 +0100
commit49b64e8dc717dd6db27dabd74b0fe238af5e8208 (patch)
tree954c87e6e7e826eca1327111b7e0c818eb9d020c /tests
parentab740cb5b9bfbacece26956fa2444763a790ccd1 (diff)
downloadNim-49b64e8dc717dd6db27dabd74b0fe238af5e8208.tar.gz
Remove declPragmas from lambdas [backport:1.0] (#16966)
* Remove declPragmas from lambdas [backport:1.0]

* add test for exportc

* fix test

* fix align, nodecl -> noinit
Diffstat (limited to 'tests')
-rw-r--r--tests/proc/tlambdapragma.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/proc/tlambdapragma.nim b/tests/proc/tlambdapragma.nim
new file mode 100644
index 000000000..daa952b1e
--- /dev/null
+++ b/tests/proc/tlambdapragma.nim
@@ -0,0 +1,7 @@
+discard """
+  errormsg: "invalid pragma: exportc"
+"""
+
+let _ = proc () {.exportc.} =
+  # this would previously cause a codegen error
+  discard