[qfcc] Fix method not found warnings

It turns out they should not be optional, but do need to be smarter
about when and which. So another two FIXMEs gone :)
This commit is contained in:
Bill Currie 2020-03-05 14:48:53 +09:00
parent 669c8f43d8
commit 59db90d177

View file

@ -1136,19 +1136,15 @@ class_message_response (class_t *class, int class_msg, expr_t *sel)
}
c = c->super_class;
}
//FIXME right option?
if (options.warnings.interface_check)
warning (sel, "%s may not respond to %c%s", class->name,
class_msg ? '+' : '-', selector->name);
warning (sel, "%s may not respond to %c%s", class->name,
class_msg ? '+' : '-', selector->name);
}
m = find_method (selector->name);
if (m)
return m;
//FIXME right option?
if (options.warnings.interface_check)
if (!m && (!class || class->type == &type_obj_object)) {
warning (sel, "could not find method for %c%s",
class_msg ? '+' : '-', selector->name);
return 0;
}
return m;
}
static uintptr_t