You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Migrated from rt.perl.org#129373 (status was 'new')
Searchable as RT129373$
The text was updated successfully, but these errors were encountered: