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
This commit is contained in:
LemonBoy
2018-09-14 15:29:34 +02:00
parent 382fe446c3
commit 839953c3e1
3 changed files with 20 additions and 14 deletions

10
tests/ccgbugs/t8964.nim Normal file
View File

@@ -0,0 +1,10 @@
discard """
targets: "c cpp"
"""
from json import JsonParsingError
import marshal
const nothing = ""
doAssertRaises(JsonParsingError):
var bar = marshal.to[int](nothing)