[Pharo-dev] Bug - SmallInteger new: aNumber crashes Pharo

Matias Garcia Isaia mgarciaisaia at gmail.com
Mon Dec 16 18:18:00 EST 2013

As stated in
SmallInteger inherits it's new: message from Behaviour, so if one expects
SmaillInteger new: 0 to give you a 0, it really crashes the VM while trying
to Inspect the result.

Running it with an argument different than 0 (SmallInteger new: 10) raises
an error ("SmallInteger cannot have variable sized instances").

I think it would be really nice to have it just return the parameter, but
that's opinology - you decide how to solve it. The thing I think is not
subjective is that the VM crashes - that shouldn't happen.

Tested in #30649
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131216/52fd6115/attachment-0002.html>

More information about the Pharo-dev mailing list