> On 30 Apr 2015, at 22:57, Marcus Denker <[email protected]> wrote:
> 
> 
>> On 30 Apr 2015, at 21:47, stepharo <[email protected]> wrote:
>> 
>> In nautilus I get an error MNU: RBBlockNode>>method
>> When I select several groups and select merge
>> 
>> 
>> mergeGroups: aCollection
>> 
>>   aCollection
>>       ifNotEmpty: [:groups || group |
>>           group := groups reduce: [:a :b | a or: [b]].
>> ^^^^^^^^^^^^
>> 
>>                                               a is a dynamicClassGroup and 
>> its superclass defines or:
>> 
> The mistake is the block around the b.  
> 
> or: in DynamicGroup is defined as
> 
> or: aGroup
> 
> and if you do not put a block, the compiler will not optimise or: —> it will 
> be send.
> (and the or: in DynamicGroup will just raise an error when it gets passed a 
> block, it
> expects a group).
> 
> But there is a second error: the mustBeBooleanInMagic: normally should work.
> (the VM executes the optimised construct —> raised an exception —> we 
> recompile
> the expression with no optimisation -> execute.
> 
> There is tiny bug there (it should be #methodNode).
> I will commit a fix for that… 
> 
> (I hope this is understandable.. as two bugs are involved this might be a bit 
> complex.
> 


To make the whole thing easier to understand we need to distinguish the two 
bugs.

1) or: is somehow special. No, it is not. We fixed that, but the fix was broken.

This is now fixed in 50026.

2) someone wrote or: [] where no block was supposed to be.

The reason for that is lint rule RBIfTrueBlocksRule, which statically enforces 
blocks as parameters for
all of or: and: and ifTrue:… we should:

  - remove the [] in that method
  - remove the rule RBIfTrueBlocksRule as it makes no sense anymore, it is from 
a time when or: was special.

DONE.

        Marcus







Reply via email to