added IS_METHOD to IS_CALLABLE

This commit is contained in:
CPunch 2020-12-12 21:17:31 -06:00
parent ec8f5e7e4f
commit bf59f70598

View File

@ -113,7 +113,7 @@ static inline bool isObjType(CValue val, CObjType type) {
// just protects against macro expansion // just protects against macro expansion
static inline bool IS_CALLABLE(CValue val) { static inline bool IS_CALLABLE(CValue val) {
return IS_CLOSURE(val) || IS_CFUNCTION(val); return IS_CLOSURE(val) || IS_CFUNCTION(val) || IS_METHOD(val);
} }
CObj *cosmoO_allocateBase(CState *state, size_t sz, CObjType type); CObj *cosmoO_allocateBase(CState *state, size_t sz, CObjType type);