# New Ticket Created by Zoffix Znet
# Please include the string: [perl #129373]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=129373 >
Unsure if this is on purpose or not:
If I have a variable with a Failure in it and I let it be the last statement of
a sub, so it's returned, and I call the sub and let its return sink, the
failure explodes:
$ perl6 -e 'sub wone { fail }; sub two { my $x = wone; $x }(); say "all good"'
Failed
in sub wone at -e line 1
in sub two at -e line 1
in block <unit> at -e line 1
Actually thrown at:
in block <unit> at -e line 1
BUT, if I use an explicit `return`, the explosion no longer happens:
$ perl6 -e 'sub wone { fail }; sub two { my $x = wone; return $x }(); say "all
good"'
all good