# New Ticket Created by Wenzel Peppmeyer
# Please include the string: [perl #76882]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=76882 >
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