On Mon Oct 03 11:48:33 2011, coke wrote:
> On Sat Jul 31 14:20:52 2010, wenzel.peppme...@gmx.de wrote:
> > use v6;
> > 
> > class A {
> >    method b(){ say 'butterfly'; };
> > };
> > 
> > my $a = A.new();
> > my $method_ref = $a.^can('b');
> > $method_ref($a);
> > 
> > sub foo($o, $m){
> >    $m($o);
> > };
> > 
> > foo($a, $method_ref);
> > 
> > --
> > 
> > butterfly
> > Null PMC access in invoke()
> >    in 'foo' at line 1:method_reference.p6
> >    in 'foo' at line 11:method_reference.p6
> >    in main program body at line 15:method_reference.p6
> > 
> 
> This no longer generates an NPA:
> 
> Method 'postcircumfix:<( )>' not found for invocant of class 'Parcel'
>   in <anon> at src/gen/Metamodel.pm:3164
>   in block <anon> at foo:9
>   in <anon> at foo:1
> 

... And is therefore (still) closable with tests.

-- 
Will "Coke" Coleda

Reply via email to