Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More twiddling with SubsetHOW's checking code.
  • Loading branch information
jnthn committed Jun 14, 2011
1 parent 22efa4f commit cb6bc83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Perl6/Metamodel/SubsetHOW.pm
Expand Up @@ -28,14 +28,14 @@ class Perl6::Metamodel::SubsetHOW

# Do check when we're on LHS of smartmatch (e.g. Even ~~ Int).
method type_check($obj, $checkee) {
pir::perl6_booleanize__PI($checkee.HOW =:= self ||
pir::perl6_booleanize__PI(pir::istrue($checkee.HOW =:= self) ||
pir::type_check__IPP($checkee, $!refinee))
}

# Here we check the value itself (when on RHS on smartmatch).
method accepts_type($obj, $checkee) {
pir::perl6_booleanize__PI(
pir::type_check__IPP($checkee, $!refinee) &&
$!refinement.ACCEPTS($checkee))
pir::istrue__IP($!refinement.ACCEPTS($checkee)))
}
}

0 comments on commit cb6bc83

Please sign in to comment.