# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #114042]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=114042 >
<masak> rn: sub a { my &x = { return }; &x }; my &y = a; &y()
<p6eval> rakudo 138213: OUTPUT«(timeout)»
<masak> hm, locally on rakudo I get 'Attempt to return outside of any
Routine'. I don't much like that error.
<masak> the return is in a Routine.
<masak> it's just that the Routine in question is exhausted.
<pmichaud> ...a Routine that has already exited, though.
<masak> right, I agree that the return heppens dynamically outside the
dynamic scope of the Routine.
<pmichaud> yes, that seems like a LTA error message
* masak submits rakudobug
<benabik> rn: sub a { my &x = { return }; &x }; sub b(&x) { &x() }; b(a)
<p6eval> rakudo 138213: OUTPUT«(timeout)»
<p6eval> ..niecza v19-13-g442e075: ( no output )
<masak> locally I still get 'Attempt to return outside of any Routine'
<masak> benabik++