# New Ticket Created by Moritz Lenz # Please include the string: [perl #130761] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=130761 >
sub f($x) { sub { if True { say &?ROUTINE.name } } }.(42)() This prints f on Rakudo 2017.01-170-gc0a907f built on MoarVM version 2017.01-31-g20dfa6b &?ROUTINE should refer to the inner, anonymous subroutine here, not to &f. The same bug happens if the inner subroutine is named, but not if the "if"-block is absent. -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/