Index: src/runtime/class.m ================================================================== --- src/runtime/class.m +++ src/runtime/class.m @@ -433,11 +433,11 @@ objc_global_mutex_lock(); for (ml = cls->methodlist; ml != NULL; ml = ml->next) { for (i = 0; i < ml->count; i++) { - if (ml->methods[i].sel.uid == sel->uid) { + if (sel_isEqual((SEL)&ml->methods[i].sel, sel)) { const char *ret = ml->methods[i].sel.types; objc_global_mutex_unlock(); return ret; } } @@ -460,10 +460,13 @@ } } objc_global_mutex_unlock(); + if (cls->superclass != NULL) + return objc_get_type_encoding(cls->superclass, sel); + return NULL; } IMP class_replaceMethod(Class cls, SEL sel, IMP newimp, const char *types)