I golfed this down to: p6 -e 'role {sub foo {}; BEGIN &foo.clone() }'
===SORRY!=== Error while compiling -e An exception occurred while evaluating a BEGIN at -e:1 Exception details: ===SORRY!=== Error while compiling Cannot invoke this object at : For reasons I don't quite understand it's not using the right clone. If you use Mu::clone directly it works: p6 -e 'role {sub foo {}; BEGIN &foo.Mu::clone() }' On Sat, Jan 2, 2016 at 3:58 AM Lloyd Fournier <lloyd.fo...@gmail.com> wrote: > should have mentioned, this is the error msg: > > ===SORRY!=== Error while compiling > Cannot invoke this object > > On Sat, Jan 2, 2016 at 3:49 AM perl6 via RT <perl6-bugs-follo...@perl.org> > wrote: > >> Greetings, >> >> This message has been automatically generated in response to the >> creation of a trouble ticket regarding: >> ".wrap doesn't work for routines declared in roles", >> a summary of which appears below. >> >> There is no need to reply to this message right now. Your ticket has been >> assigned an ID of [perl #127112]. >> >> Please include the string: >> >> [perl #127112] >> >> in the subject line of all future correspondence about this issue. To do >> so, >> you may reply to this message. >> >> Thank you, >> perl6-bugs-follo...@perl.org >> >> ------------------------------------------------------------------------- >> role Foo { >> sub foo { }; >> BEGIN &foo.wrap(-> {}); >> } >> >>