Skip Menu |
Report information
Id: 127901
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: jns+bc [at] gellyfish.co.uk
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] "Cannot invoke object with invocation handler in this context" in CALL-ME on multi
Download (untitled) / with headers
text/plain 827b
If you try to provide the implementation of a multi method via a CALL-ME then invocation will give rise to "Cannot invoke object with invocation handler in this context". It is only necessary for the target method to be a multi not the CALL-ME. This appears to be related to https://rt.perl.org/Ticket/Display.html?id=122899 but I'm ticketing it separately as this is a more generalised case. This will also afflict multi native subs it seems. role Zub[::T] { proto method CALL-ME(|c) { * } multi method CALL-ME(Mu:D $self) { } multi method CALL-ME(Mu:D $self, T $i) { } } multi sub trait_mod:<is> (Method $m, :$foo!) is export { $m does Zub[Int]; } class Foo { proto method bar(|c) { * } multi method bar() is foo { } multi method bar(Int $o) is foo { } } Foo.new.bar(1);
Download (untitled) / with headers
text/plain 260b
Still present in 2016.06-154-g55c359e built on MoarVM version 2016.06-9-g8fc21d5 zoffix@VirtualBox:/tmp/tmp.g7rJ2YNub7$ perl6 p.pl Cannot invoke object with invocation handler in this context in method bar at p.pl line 14 in block <unit> at p.pl line 22


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org