prevented the _is_kind_of primitive handler from returning an error

This commit is contained in:
hyunghwan.chung
2017-09-29 15:12:01 +00:00
parent 303b49270d
commit a240b0be7d
3 changed files with 7 additions and 4 deletions

View File

@ -2105,9 +2105,8 @@ static moo_pfrc_t pf_is_kind_of (moo_t* moo, moo_ooi_t nargs)
rcv = MOO_STACK_GETRCV(moo, nargs);
_class = MOO_STACK_GETARG(moo, nargs, 0);
MOO_PF_CHECK_ARGS (moo, nargs, MOO_CLASSOF(moo, _class) == moo->_class);
if (moo_iskindof(moo, rcv, (moo_oop_class_t)_class))
if (MOO_CLASSOF(moo, _class) == moo->_class &&
moo_iskindof(moo, rcv, (moo_oop_class_t)_class))
{
MOO_STACK_SETRET (moo, nargs, moo->_true);
}