fix style type
This commit is contained in:
parent
79ad349fb5
commit
c748d9afb7
|
@ -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 =
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue