Strange behaviour of messages with mismatched arguments..

Peter Smet peter.smet at flinders.edu.au
Mon Jun 28 17:22:48 UTC 1999


I was investigating some weird behaviour in my program (which is about the
only kind of behaviour I am getting) when I noticed that messages where the
selector and the arguments don't match result in strange things.
For example:

| b |
b := Bag new.
(Message selector: #add: arguments: #(1 2 3)) sentTo: b.
b.

The bag will end up adding the selector to itself instead of raising an
error message. If you send it an empty array of args the same thing happens.

Is this the intended behaviour?

Peter





More information about the Squeak-dev mailing list