From 1bb117cd7a49954832d21e6a1502492770acb77b Mon Sep 17 00:00:00 2001 From: metagn Date: Tue, 11 Apr 2023 10:23:41 +0300 Subject: `proc` typeclass accounts for `iterator`, call conventions + `nil` fix + document typeclass AST (#21629) * test fix #16546 #16548 + another issue * please don't tell me other packages do this * fix CI + test typeclass callconv pragma * better logic in parser * docs and changelog --- lib/pure/hashes.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure') diff --git a/lib/pure/hashes.nim b/lib/pure/hashes.nim index 4ae4938c6..56c360138 100644 --- a/lib/pure/hashes.nim +++ b/lib/pure/hashes.nim @@ -501,7 +501,7 @@ proc hashIgnoreCase*(sBuf: string, sPos, ePos: int): Hash = h = h !& ord(c) result = !$h -proc hash*[T: tuple | object | proc](x: T): Hash = +proc hash*[T: tuple | object | proc | iterator {.closure.}](x: T): Hash = ## Efficient `hash` overload. runnableExamples: # for `tuple|object`, `hash` must be defined for each component of `x`. -- cgit 1.4.1-2-gfad0