Closed p6rt closed 7 years ago
\
Per further discussion on #perl6...
By definition, I think that "lexotic" sharply limits what can be done statically. If a C\
However, a return that is invoked dynamically outside of any Routine should throw a runtime error, so I'm changing the topic of this ticket to match that.
Pm
The RT System itself - Status changed from 'new' to 'open'
[14:22:01] \
A `return` outside a routine now always seems to throw a run-time error, as it should:
$ perl6 -e 'return'
Attempt to return outside of any Routine
in block \
$ perl6 -e '{ return }'
Attempt to return outside of any Routine
in block \
$ MVM_SPESH_DISABLE=1 perl6 -e '{ return }'
Attempt to return outside of any Routine
in block \
Bisectable points to this fix from Dec 2015:
https://gist.github.com/Whateverable/63b5da597e229d167d8708a43d4501de https://github.com/rakudo/rakudo/commit/a4ca12a
This ticket can be closed once tests are added to roast.
On Sun, 10 Sep 2017 11:22:29 -0700, smls75@gmail.com wrote:
A `return` outside a routine now always seems to throw a run-time error, as it should:
$ perl6 -e 'return' Attempt to return outside of any Routine in block \
at -e line 1 $ perl6 -e '{ return }' Attempt to return outside of any Routine in block \
at -e line 1 $ MVM_SPESH_DISABLE=1 perl6 -e '{ return }' Attempt to return outside of any Routine in block \
at -e line 1 Bisectable points to this fix from Dec 2015:
https://gist.github.com/Whateverable/63b5da597e229d167d8708a43d4501de https://github.com/rakudo/rakudo/commit/a4ca12a
This ticket can be closed once tests are added to roast.
It looks to me like the tests already in S04-statements/return.t should suffice, no?
(This appears to be another case where a bug filed and fixed during the craziness of the 2015 release and GLR was not followed up in RT by closing the ticket.)
Since MVM_* environment variables are not part of the Perl 6 specification, tests for those cases aren't a matter for roast... possibly they could go in the rakudo tree, but it would probably be better to figure out how to golf that SEGV down into an nqp one-liner... rakudo can no longer produce the situation that caused that SEGV, so... where to follow that thread I dunno.
It looks to me like the tests already in S04-statements/return.t should suffice, no?
You're right. Closing the ticket.
@smls - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#122504 (status was 'resolved')
Searchable as RT122504$