Skip to content
Permalink
Browse files

Streamline Failure.defined/Bool a bit

  • Loading branch information...
lizmat committed Dec 26, 2018
1 parent 7d3b7e1 commit 2d704af4ea465d39047ab9c44f09a73fca350d42
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/core/Failure.pm6
@@ -52,11 +52,9 @@ my class Failure is Nil {
# TODO: should be Failure:D: multi just like method Bool,
# but obscure problems prevent us from making Mu.defined
# a multi. See http://irclog.perlgeek.de/perl6/2011-06-28#i_4016747
method defined() {
$!handled = 1 if nqp::isconcrete(self);
Bool::False;
}
multi method Bool(Failure:D:) { $!handled = 1; Bool::False; }
method defined(--> False) { $!handled = 1 if nqp::isconcrete(self) }

multi method Bool(Failure:D: --> False) { $!handled = 1 }
method handled() is rw {
Proxy.new(
FETCH => {

0 comments on commit 2d704af

Please sign in to comment.
You can’t perform that action at this time.