summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorBung <crc32@qq.com>2023-08-08 16:06:47 +0800
committerGitHub <noreply@github.com>2023-08-08 16:06:47 +0800
commit37d8f32ae9ead55a065ae42636e88265ea17ce4a (patch)
treede495baeeedf32862c57c70a415e16ac8a12d464 /tests
parent47d06d3d4cb85a0c7c2273864f6088a5e8521f44 (diff)
downloadNim-37d8f32ae9ead55a065ae42636e88265ea17ce4a.tar.gz
fix #18823 Passing Natural to bitops.BitsRange[T] parameter in generi… (#20683)
* fix #18823 Passing Natural to bitops.BitsRange[T] parameter in generic proc is compile error
Diffstat (limited to 'tests')
-rw-r--r--tests/generics/t18823.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/generics/t18823.nim b/tests/generics/t18823.nim
new file mode 100644
index 000000000..94c79aebe
--- /dev/null
+++ b/tests/generics/t18823.nim
@@ -0,0 +1,6 @@
+type BitsRange[T] = range[0..sizeof(T)*8-1]
+
+proc bar[T](a: T; b: BitsRange[T]) =
+  discard
+
+bar(1, 2.Natural)