summary refs log tree commit diff stats
path: root/tests/cpp
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-07-08 22:07:45 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-07-08 22:07:45 +0200
commitd0b60f1fe3f82facec7f99f39b8bf188be3661a0 (patch)
tree6ebda6dacfa5fb20ea63577c75150773634accbd /tests/cpp
parent03c8fdc6cb4e4cd0f84aabcfb00f6d38f58d51cd (diff)
downloadNim-d0b60f1fe3f82facec7f99f39b8bf188be3661a0.tar.gz
Generate dynlib strings as a single rope (#8247)
In order not to trip the optimization in genInfixCall we have to do so.
The same trick is also used in setExternName.

Fixes #8241
Diffstat (limited to 'tests/cpp')
-rw-r--r--tests/cpp/t8241.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/cpp/t8241.nim b/tests/cpp/t8241.nim
new file mode 100644
index 000000000..8e98fda10
--- /dev/null
+++ b/tests/cpp/t8241.nim
@@ -0,0 +1,7 @@
+discard """
+  targets: "cpp"
+  action: "compile"
+"""
+
+proc foo(): cstring {.importcpp: "", dynlib: "".}
+echo foo()