diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-12-15 15:13:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-15 08:13:25 +0100 |
commit | cca5684a17e654a13ddac046f1e76873d8c19f55 (patch) | |
tree | afda8a5c8a114bbb85db9a2e743e6e88b4f899fb /lib/pure/collections/tables.nim | |
parent | a4628532b27857d095e69b7b162b453fc2b8373c (diff) | |
download | Nim-cca5684a17e654a13ddac046f1e76873d8c19f55.tar.gz |
fixes yet another strictdefs bug (#23069)
Diffstat (limited to 'lib/pure/collections/tables.nim')
-rw-r--r-- | lib/pure/collections/tables.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim index 8e4a3c35f..4c3b72797 100644 --- a/lib/pure/collections/tables.nim +++ b/lib/pure/collections/tables.nim @@ -278,6 +278,7 @@ proc initTable*[A, B](initialSize = defaultInitialSize): Table[A, B] = let a = initTable[int, string]() b = initTable[char, seq[int]]() + result = default(Table[A, B]) initImpl(result, initialSize) proc `[]=`*[A, B](t: var Table[A, B], key: A, val: sink B) = @@ -1346,6 +1347,7 @@ proc initOrderedTable*[A, B](initialSize = defaultInitialSize): OrderedTable[A, let a = initOrderedTable[int, string]() b = initOrderedTable[char, seq[int]]() + result = default(OrderedTable[A, B]) initImpl(result, initialSize) proc `[]=`*[A, B](t: var OrderedTable[A, B], key: A, val: sink B) = @@ -2336,6 +2338,7 @@ proc initCountTable*[A](initialSize = defaultInitialSize): CountTable[A] = ## * `toCountTable proc<#toCountTable,openArray[A]>`_ ## * `newCountTable proc<#newCountTable>`_ for creating a ## `CountTableRef` + result = default(CountTable[A]) initImpl(result, initialSize) proc toCountTable*[A](keys: openArray[A]): CountTable[A] = |