diff options
Diffstat (limited to 'lib/pure/collections/tables.nim')
-rw-r--r-- | lib/pure/collections/tables.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim index e454a43cb..8d5fbdfc3 100644 --- a/lib/pure/collections/tables.nim +++ b/lib/pure/collections/tables.nim @@ -304,8 +304,9 @@ template equalsImpl() = # to use the slow route here: for key, val in s: # prefix notation leads to automatic dereference in case of PTable - if not t.hasKey(key): return false - if t[key] != val: return false + try: + if t[key] != val: return false + except KeyError: return false return true proc `==`*[A, B](s, t: Table[A, B]): bool = |