summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-04-19 14:42:45 +0200
committerGitHub <noreply@github.com>2020-04-19 14:42:45 +0200
commit242d39d27f672a0f3b21f5e8f1752218d1f480f2 (patch)
treed6579887e27d1aedac4f87c0864ec50a170b05f7
parent73eff1f4579c62a083886d78980ecdc805990041 (diff)
downloadNim-242d39d27f672a0f3b21f5e8f1752218d1f480f2.tar.gz
fixes #12834 (#14017)
-rw-r--r--lib/pure/hashes.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/hashes.nim b/lib/pure/hashes.nim
index 287b152d2..f7b4e907b 100644
--- a/lib/pure/hashes.nim
+++ b/lib/pure/hashes.nim
@@ -174,16 +174,16 @@ proc hash*[T: proc](x: T): Hash {.inline.} =
   else:
     result = hash(pointer(x))
 
-proc hashIdentity*[T: Ordinal](x: T): Hash {.inline, since: (1, 3).} =
+proc hashIdentity*[T: Ordinal|enum](x: T): Hash {.inline, since: (1, 3).} =
   ## The identity hash.  I.e. ``hashIdentity(x) = x``.
   cast[Hash](ord(x))
 
 when defined(nimIntHash1):
-  proc hash*[T: Ordinal](x: T): Hash {.inline.} =
+  proc hash*[T: Ordinal|enum](x: T): Hash {.inline.} =
     ## Efficient hashing of integers.
     cast[Hash](ord(x))
 else:
-  proc hash*[T: Ordinal](x: T): Hash {.inline.} =
+  proc hash*[T: Ordinal|enum](x: T): Hash {.inline.} =
     ## Efficient hashing of integers.
     hashWangYi1(uint64(ord(x)))