Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[common] Implement .isa in NQPClassHOW.
  • Loading branch information
jnthn committed Nov 7, 2010
1 parent f7efbd5 commit ea111e5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions common/NQP/NQPSetting.pm
Expand Up @@ -557,6 +557,22 @@ my knowhow NQPClassHOW {
nqp::repr_defined(self)
}

##
## Czechy
##

method isa($obj, $checkee) {
my $i := 0;
my $mro_length := +@!mro;
while $i != $mro_length {
if @!mro[$i] =:= $checkee {
return 1;
}
$i := $i + 1;
}
0;
}

##
## Dispatchy
##
Expand Down

0 comments on commit ea111e5

Please sign in to comment.