lenient_stint, typo stuint vs stint in signed conversion

This commit is contained in:
Mamy Ratsimbazafy 2018-06-14 18:42:58 +02:00 committed by GitHub
parent 46e0810bd3
commit 35c57de63d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -45,12 +45,12 @@ macro make_mixed_types_ops(op: untyped, ResultTy: untyped, sign: static[Signedne
result.add quote do:
proc `op`*[bits: static[int]](a: Stint[bits], b: SomeInteger): `ResultTy` {.inline.}=
`op`(a, b.stuint(bits))
`op`(a, b.stint(bits))
if switchInputs:
result.add quote do:
proc `op`*[bits: static[int]](a: SomeInteger, b: Stint[bits]): `ResultTy` {.inline.}=
`op`(a.stuint(bits), b)
`op`(a.stint(bits), b)
make_mixed_types_ops(`+`, InputType, BothSigned, switchInputs = true)
make_mixed_types_ops(`+=`, InputType, BothSigned, switchInputs = false)