From c7c3362cc818a660806d7247da51cd45d9660258 Mon Sep 17 00:00:00 2001 From: Bung Date: Mon, 5 Jun 2023 16:30:08 +0800 Subject: [PATCH] add test case for #7839 (#22006) --- tests/generics/t7839.nim | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/generics/t7839.nim diff --git a/tests/generics/t7839.nim b/tests/generics/t7839.nim new file mode 100644 index 0000000000..4d17b438b9 --- /dev/null +++ b/tests/generics/t7839.nim @@ -0,0 +1,9 @@ +type A[I: SomeOrdinal, E] = tuple # same for object + length: int + +doAssert A.sizeof == sizeof(int) # works without the following proc + +proc newA*[I: SomeOrdinal, E](): A[I, E] = # works without `SomeOrdinal` + discard + +discard newA[uint8, int]()