Amber can compile things methods that use blocks with return, there
should not be any problem with it, but from what I looked into compiler,
it compiles it a little brittle way, if you combine the right set of
selector in call chain, you don't get what you expect (at least it seems
from the implementation).
Herby
P.S.: Error in console during compilation? Hmm... then maybe there is
really some problem.
Amber Milan Eskridge wrote:
> That is a bug in compiler I think, because it produces a syntax error in
> the console.
>
>
>
> On Tue, Apr 24, 2012 at 1:48 PM, Vicnet <
[hidden email]
> <mailto:
[hidden email]>> wrote:
>
> Hello,
>
> I try to compile Matrix from Pharo on Amber.
>
> In Matrix, there is this message:
>
> identityIndexOf: anElement ifAbsent: anExceptionBlock
> ^self rowAndColumnForIndex:
> (contents identityIndexOf: anElement ifAbsent:
> [^anExceptionBlock value])
>
>
> Amber does not compile this because of the return ^ symbol in block.
>
> Even test >> ^ [ ^ nil ] is not accepted.
>
> There no error message nor success (message is not added in browser).
>
> Is it normal or a bug ?
>
> a+
> Vicnet
>
>