summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2018-09-14 15:29:34 +0200
committerLemonBoy <thatlemon@gmail.com>2018-09-14 15:37:51 +0200
commit839953c3e167828f93bdddd27ae88c5909c8aca9 (patch)
treedcdb7542d3420d2405f81d56297920d94424a7ec /tests
parent382fe446c3926f7976de09b7a1d8ad131912c7b6 (diff)
downloadNim-839953c3e167828f93bdddd27ae88c5909c8aca9.tar.gz
Fix hashing for codegenProc (sic) types
Since the name mangling is inhibited we should take the user-supplied
name during the sighash computation.

Fixes #8964
Diffstat (limited to 'tests')
-rw-r--r--tests/ccgbugs/t8964.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ccgbugs/t8964.nim b/tests/ccgbugs/t8964.nim
new file mode 100644
index 000000000..5b41e8bdb
--- /dev/null
+++ b/tests/ccgbugs/t8964.nim
@@ -0,0 +1,10 @@
+discard """
+  targets: "c cpp"
+"""
+
+from json import JsonParsingError
+import marshal
+
+const nothing = ""
+doAssertRaises(JsonParsingError):
+  var bar = marshal.to[int](nothing)