fix sighashes for generic ref (#20723)

the `hashType` issue in #12229 was never really fixed - it just stopped
being called in that context
This commit is contained in:
Jacek Sieka 2022-11-01 19:01:06 +01:00 • committed by GitHub
commit 58f79e7c3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -185,6 +185,7 @@ proc hashType(c: var MD5Context, t: PType; flags: set[ConsiderFlag]) =
hashType c, t[0], flags hashType c, t[0], flags
of tyRef, tyPtr, tyGenericBody, tyVar: of tyRef, tyPtr, tyGenericBody, tyVar:
c &= char(t.kind) c &= char(t.kind)
if t.sons.len > 0:
c.hashType t.lastSon, flags c.hashType t.lastSon, flags
if tfVarIsPtr in t.flags: c &= ".varisptr" if tfVarIsPtr in t.flags: c &= ".varisptr"
of tyFromExpr: of tyFromExpr: