summary refs log tree commit diff stats
path: root/tests/exception/tcpp_imported_exc2.nim
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2020-05-18 08:38:36 +0100
committerGitHub <noreply@github.com>2020-05-18 09:38:36 +0200
commitbc42e9aa9877e341668f5278bddda73f403d01e4 (patch)
treed617cf3a7aa46e1088dbfa35ee410b993a561193 /tests/exception/tcpp_imported_exc2.nim
parentb11ff518faec4efe4d5b6e2151d07bf19e26eae0 (diff)
downloadNim-bc42e9aa9877e341668f5278bddda73f403d01e4.tar.gz
fix #14369 (#14386)
* fix #14369

* empty commit
Diffstat (limited to 'tests/exception/tcpp_imported_exc2.nim')
-rw-r--r--tests/exception/tcpp_imported_exc2.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/exception/tcpp_imported_exc2.nim b/tests/exception/tcpp_imported_exc2.nim
new file mode 100644
index 000000000..ff299ea3d
--- /dev/null
+++ b/tests/exception/tcpp_imported_exc2.nim
@@ -0,0 +1,10 @@
+discard """
+targets: "cpp"
+output: ""
+"""
+#issue #14369 case 2
+type RuntimeError {.requiresInit, importcpp: "std::runtime_error", header: "<stdexcept>".} = object
+
+proc initRuntimeError(a: cstring): RuntimeError {.importcpp: "std::runtime_error(@)", constructor.}
+try: raise initRuntimeError("foo2")
+except: discard