Marcus we should add a rule for the or: [b] Stef Le 30/4/15 22:57, Marcus Denker a écrit :
On 30 Apr 2015, at 21:47, stepharo <stepharo@free.fr> 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.
RBBlockNode(Object)>>doesNotUnderstand: #method RBBlockNode>>sourceNodeForPC: DynamicClassGroup(Object)>>mustBeBooleanInMagic: D
Marcus