summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-07-12 13:00:11 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-07-12 13:00:11 +0200
commitba1f036a56362885d543f470642230de40df217d (patch)
tree1ad2923fc10de7529b4d5342d9ec8bb98fe79162 /compiler
parent9aad193d2753ffb6ec619d45c8f29cb9db864b35 (diff)
downloadNim-ba1f036a56362885d543f470642230de40df217d.tar.gz
Correctly hash inferred types (#8286)
We don't really want to hash the tyInferred container since that'd make
the "real" type and its inferred counterpart produce different hashes
and types for the very same type.

Fixes #8280
Diffstat (limited to 'compiler')
-rw-r--r--compiler/sighashes.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/sighashes.nim b/compiler/sighashes.nim
index 0bf2b8459..8f95175e5 100644
--- a/compiler/sighashes.nim
+++ b/compiler/sighashes.nim
@@ -163,7 +163,7 @@ proc hashType(c: var MD5Context, t: PType; flags: set[ConsiderFlag]) =
         c.hashType t.sons[i], flags
     else:
       c.hashType t.lastSon, flags
-  of tyAlias, tySink, tyUserTypeClasses:
+  of tyAlias, tySink, tyUserTypeClasses, tyInferred:
     c.hashType t.lastSon, flags
   of tyBool, tyChar, tyInt..tyUInt64:
     # no canonicalization for integral types, so that e.g. ``pid_t`` is