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

Owner: Nobody
Requestors: jns+bc [at]

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 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 { } };
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 Cannot invoke object with invocation handler in this context in method bar at line 14 in block <unit> at line 22

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

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