summary refs log tree commit diff stats
path: root/tests/cpp/t8241.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cpp/t8241.nim')
-rw-r--r--tests/cpp/t8241.nim11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/cpp/t8241.nim b/tests/cpp/t8241.nim
index cbee1d85a..9aed13fcb 100644
--- a/tests/cpp/t8241.nim
+++ b/tests/cpp/t8241.nim
@@ -20,4 +20,13 @@ proc findlib2: string =
 proc imported_func2*(a: cint): cstring {.importc, dynlib: findlib2().}
 
 echo imported_func(1)
-echo imported_func2(1)
\ No newline at end of file
+echo imported_func2(1)
+
+# issue #8946
+
+from json import JsonParsingError
+import marshal
+
+const nothing = ""
+doAssertRaises(JsonParsingError):
+  var bar = marshal.to[int](nothing)