mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-04 04:54:49 +00:00
* 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:
6
tests/generics/t18823.nim
Normal file
6
tests/generics/t18823.nim
Normal 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)
|
||||
Reference in New Issue
Block a user