Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Mu ~~ 0 is false
By default, nothing defined should be accepting anything undefined.
  • Loading branch information
TimToady committed Sep 23, 2015
1 parent be02b7c commit 5a534d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Any.pm
Expand Up @@ -14,7 +14,8 @@ my role Numeric { ... }
my class Any { # declared in BOOTSTRAP
# my class Any is Mu {

multi method ACCEPTS(Any:D: Mu \a) { self === a }
multi method ACCEPTS(Any:D: Mu:D \a) { self === a }
multi method ACCEPTS(Any:D: Mu:U \a) { False }
multi method ACCEPTS(Any:U: Any \topic) { # use of Any on topic to force autothreading
nqp::p6bool(nqp::istype(topic, self)) # so that all(@foo) ~~ Type works as expected
}
Expand Down

0 comments on commit 5a534d6

Please sign in to comment.