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

(cherry picked from commit 37d8f32ae9)
This commit is contained in:
Bung
2023-08-08 16:06:47 +08:00
committed by narimiran
parent a7394440b9
commit c1745b5924
4 changed files with 23 additions and 10 deletions

View File

@@ -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)