# New Ticket Created by Shoichi Kaji # Please include the string: [perl #126301] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=126301 >
(Note that the script is also at https://gist.github.com/shoichikaji/e0baf95e6f602a443f16 ) Following script exits with error: $ cat test.p6 class A {} class B { sub foo(A $a) {} A.^add_method('bar', method () { foo(self); }); } $ perl6 -v This is perl6 version 2015.09-289-g6f31121 built on MoarVM version 2015.09-69-g741cb9c $ perl6 test.p6 ===SORRY!=== Error while compiling test.p6 Calling foo(B) will never work with declared signature (A $a) at test.p6:6 ------> ⏏foo(self);