[Cuis-dev] Bug or feature? #asInteger behaviour

Philip Bernhart philip.bernhart at posteo.de
Wed Jan 6 01:25:10 PST 2021


Hi,

I just noticed that #asInteger has an unexpected behaviour.
That I thought is worth pointing out. Depending on what
someone could interpret as an integer (all unsigned numbers or
including negative numbers).

I found out while looking at some Pharo code that:

'-1' asInteger => -1 (in Pharo)
'-1' asInteger => 1 (in Cuis)

'Mötör-45heäd' asInteger => -45 (in Pharo)
'Mötör-45heäd' asInteger => 45 (in Cuis)

So the sign is lost.

Was this intentional? Bug or feature?


Thanks,
Philip
-- 


More information about the Cuis-dev mailing list