Files
Nim/tests/generics/t21958.nim
Mamy Ratsimbazafy 171b916613 Add anti-regression for #21958 (#21960)
Add anti-regression test to close #21958
2023-05-30 10:46:24 +08:00

11 lines
189 B
Nim

discard """
action: compile
"""
type
Ct*[T: SomeUnsignedInt] = distinct T
template `shr`*[T: Ct](x: T, y: SomeInteger): T = T(T.T(x) shr y)
var x: Ct[uint64]
let y {.used.} = x shr 2