diff options
author | Bung <crc32@qq.com> | 2023-06-05 16:30:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-05 16:30:08 +0800 |
commit | c7c3362cc818a660806d7247da51cd45d9660258 (patch) | |
tree | 1398a2d4024db4185badd41707e0811201a613df /tests/generics | |
parent | 1edae67efd90a880bd537f27a3cfabbed722a7af (diff) | |
download | Nim-c7c3362cc818a660806d7247da51cd45d9660258.tar.gz |
add test case for #7839 (#22006)
Diffstat (limited to 'tests/generics')
-rw-r--r-- | tests/generics/t7839.nim | 9 |
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]() |