summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/statictypes/tgenericcomputedrange.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/statictypes/tgenericcomputedrange.nim b/tests/statictypes/tgenericcomputedrange.nim
index 82abe2677..9e3a49ae0 100644
--- a/tests/statictypes/tgenericcomputedrange.nim
+++ b/tests/statictypes/tgenericcomputedrange.nim
@@ -115,3 +115,11 @@ block: # issue #22187
     k: array[p(m(T, s)), int64]
   var x: F[int, 3]
   doAssert x.k is array[3, int64]
+
+block: # issue #22490
+  proc log2trunc(x: uint64): int =
+    if x == 0: int(0) else: int(0)
+  template maxChunkIdx(T: typedesc): int64 = 0'i64
+  template layer(vIdx: int64): int = log2trunc(0'u64)
+  type HashList[T] = object
+    indices: array[int(layer(maxChunkIdx(T))), int]