fix style type

This commit is contained in:
jangko 2023-06-14 09:52:56 +07:00
parent 79ad349fb5
commit c748d9afb7
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
3 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@ func stint*[T: SomeInteger](n: T, bits: static[int]): StInt[bits] {.inline.}=
else:
result.imp = stuint(n, bits)
func to*(a: SomeInteger, T: typedesc[Stint]): T =
func to*(a: SomeInteger, T: typedesc[StInt]): T =
stint(a, result.bits)
func to*(a: SomeUnsignedInt, T: typedesc[StUint]): T =

View File

@ -104,10 +104,10 @@ template `[]`*(a: StInt, i: SomeInteger or BackwardsIndex): Word =
template `[]=`*(a: var StInt, i: SomeInteger or BackwardsIndex, val: Word) =
a.imp.limbs[i] = val
template `[]`*(a: StUInt, i: SomeInteger or BackwardsIndex): Word =
template `[]`*(a: StUint, i: SomeInteger or BackwardsIndex): Word =
a.limbs[i]
template `[]=`*(a: var StUInt, i: SomeInteger or BackwardsIndex, val: Word) =
template `[]=`*(a: var StUint, i: SomeInteger or BackwardsIndex, val: Word) =
a.limbs[i] = val
# Iterations

View File

@ -191,7 +191,7 @@ suite "Testing unsigned int comparison operators":
let
a = 10.stuint(64)
b = 15.stuint(64)
c = 150'u16
c = 150'u64
d = 4.stuint(128) shl 64
e = 4.stuint(128)
f = 4.stuint(128) shl 65