On Tue Jun 15 08:37:28 2010, masak wrote:
> <masak> rakudo: my $d; class A {method x { $d }}; for () { sub }
> <p6eval> rakudo 99b6dd: OUTPUT«===SORRY!===Symbol '$ss_SS_S_S__S_S_s'
> not predeclared [...]
> <masak> locally, "Symbol '$d' not predeclared in <anonymous>"
> * masak , honsetly confused, submits rakudobug
> <masak> std: my $d; class A {method x { $d }}; for () { sub }
> <p6eval> std 31266: OUTPUT«===SORRY!===Malformed block at [...]
> class A {method x { $d }}; for () { sub⏏}expecting any of: name
> routine_deftraitParse failedFAILED 00:01 108m»
>
> I don't know exactly why, but it seems that Rakudo, failing to realize
> that the 'sub' thing in the for loop in fact constitutes a syntax
> error, it instead blames the first innocent variable declaration it
> finds.
Now, more like std:
19:25 < [Coke]> rakudo: my $d; class A {method x { $d }}; for () { sub }
19:26 <+p6eval> rakudo 38907e: OUTPUT«===SORRY!===Missing block at line 1,
near "}"»
Closable with tests.
--
Will "Coke" Coleda