Add anti-regression for #21958 (#21960)

Add anti-regression test to close #21958
This commit is contained in:
Mamy Ratsimbazafy
2023-05-30 04:46:24 +02:00
committed by GitHub
parent 244565397d
commit 171b916613

11
tests/generics/t21958.nim Normal file
View File

@@ -0,0 +1,11 @@
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