From aa6f9d490ffbb7750ffa6b89ed57de3c4fb88718 Mon Sep 17 00:00:00 2001 From: Bung Date: Thu, 27 Oct 2022 18:22:04 +0800 Subject: fix #6637 array index type depends generic (#20673) --- tests/generics/t6637.nim | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/generics/t6637.nim (limited to 'tests/generics') diff --git a/tests/generics/t6637.nim b/tests/generics/t6637.nim new file mode 100644 index 000000000..dd4f339a2 --- /dev/null +++ b/tests/generics/t6637.nim @@ -0,0 +1,9 @@ + +type + Grid2D*[I: SomeInteger, w, h: static[I], T] = object + grid: array[w, array[h, T]] + Grid2DIns = Grid2D[int, 2, 3, uint8] + +let a = Grid2DIns() +doAssert a.grid.len == 2 +doAssert a.grid[0].len == 3 -- cgit 1.4.1-2-gfad0 /> Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.Kartik K. Agaram <vc@akkartik.com>
about summary refs log blame commit diff stats
path: root/html/036refcount.cc.html
blob: 41c7a557f8b82b8a09d819f732fef11fb81cfd1a (plain) (tree)
1
2
3
4
5
6
7
8
9