I was reviewing some code in the GBS tester when I came across the equivalent of
'Test failed because ', Object new
I was surprised that worked, so I looked into it. I'm posting this so that others will be aware of this potentially unexpected behaviour.
It succeeds since the variable size of an arbitrary object is zero. The concatenation method doesn't care that the receiver is bytes and the argument is objects. There are zero of them to add to the concatenation, so it quietly works.
I do think the behaviour is correct.
--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
To view this discussion on the web visit
https://groups.google.com/d/msgid/va-smalltalk/f7a5108c-9477-400a-b1cb-87a7f5620788%40googlegroups.com.