On 12 Jan 2015, at 10:57, Marcus Denker <marcus.denker@inria.fr> wrote:
On 10 Jan 2015, at 12:20, Evan Donahue <emdonahu@gmail.com <mailto:emdonahu@gmail.com>> wrote:
Hmm, so that works when I annotate my test class, but I probably shouldn't be exporting pragma concerns to my end users. Was your other suggestion about dealing with the warning itself something I could do, or were you referring to a change to pharo itself?
I think we should remove the warning.
https://pharo.fogbugz.com/f/cases/14701/compile-normal-message-send-for-and-... <https://pharo.fogbugz.com/f/cases/14701/compile-normal-message-send-for-and-...>
This is now in Pharo4 update 40439
But this just solves the problem for the case where the block for and: has an argument.
When you send and: [] to a non-boolean (your own Boolean), it will nevertheless optimize the contruct⦠(but then the #museBeBoolean: magic should take care of it? I think, yes.
YES! 1 and: [ 2 ] â> DNU SmallInteger and: This means that the code ist compiled with inline and:, then executing calls #mustBeBoolean, and we then do ^ self mustBeBooleanInMagic: thisContext sender Which carefully gets the needed code + data, compile a non-optimized code, executes that and returns it. Magic :-) Marcus