[Cuis-dev] LargeNegativeInteger --- extra minus signs when printing
Juan Vuletich
juan at jvuletich.org
Thu Sep 16 10:30:38 PDT 2021
On 9/14/2021 10:29 PM, Andres Valloud via Cuis-dev wrote:
> Actually I'm starting to think that printOn:base:nDigits: should be
> private in LargePositiveInteger, rather than public.
>
> On 9/14/21 6:07 PM, Andres Valloud via Cuis-dev wrote:
>> Hi, consider this test case.
>>
>> | ws |
>> ws := String new writeStream.
>> 1 bitShift: 64 :: negated :: printOn: ws base: 10 nDigits: 20.
>> ws contents '-1844674407-3709551616'
>>
>> The problem is that printOn:base:nDigits: is not reimplemented in
>> LargeNegativeInteger. See attached for a suggested fix.
>>
>> Andres.
>>
Just redefined it in LargeNegativeInteger to fail.
Thanks,
--
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich
More information about the Cuis-dev
mailing list