summary refs log tree commit diff stats
path: root/tests/generics
diff options
context:
space:
mode:
authorBung <crc32@qq.com>2023-06-05 16:30:08 +0800
committerGitHub <noreply@github.com>2023-06-05 16:30:08 +0800
commitc7c3362cc818a660806d7247da51cd45d9660258 (patch)
tree1398a2d4024db4185badd41707e0811201a613df /tests/generics
parent1edae67efd90a880bd537f27a3cfabbed722a7af (diff)
downloadNim-c7c3362cc818a660806d7247da51cd45d9660258.tar.gz
add test case for #7839 (#22006)
Diffstat (limited to 'tests/generics')
-rw-r--r--tests/generics/t7839.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/generics/t7839.nim b/tests/generics/t7839.nim
new file mode 100644
index 000000000..4d17b438b
--- /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]()