On Thu Jun 25 12:53:52 2009, matt-w wrote:
> As far as I'm aware, these should be, semantically, the same:
> 
> role R { }
> class C {
>   method a { }
>   &a := method { } but R;
> }
> 
> and
> 
> role R {}; class C { method a { }; &a := method { } but R; }
> 
> However, the first says:
> 
> rtype not set
> in Main (src/gen_setting.pm:3225)
> 
> While the second remains silent.
> 
> I'm not sure I'm supposed to be mixing roles into methods, but as far
> as I'm concerned they're objects, so why not? This particular
> behaviour came to light trying to produce a test case for the 'rtype
> not set' error to help figure out what that is (it comes from inside
> the PAST compiler inside PCT, as far as I can tell, from one of two
> methods in Compiler.pir, but I can't figure out any more than that).

These now both error the same way on rakudo:

$ ./perl6 a.p6 
===SORRY!===
Cannot use bind operator with this LHS at line 4, near " method { "

$ ./perl6 b.p6
===SORRY!===
Cannot use bind operator with this LHS at line 1, near " method { "



-- 
Will "Coke" Coleda

Reply via email to