Permalink
Browse files

[common] Implement .isa in NQPClassHOW.

  • Loading branch information...
1 parent f7efbd5 commit ea111e5f3bad3a65fd8a540dece6e261d5ab0a7d @jnthn committed Nov 7, 2010
Showing with 16 additions and 0 deletions.
  1. +16 −0 common/NQP/NQPSetting.pm
View
@@ -558,6 +558,22 @@ my knowhow NQPClassHOW {
}
##
+ ## 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
##

0 comments on commit ea111e5

Please sign in to comment.