diff --git a/tools/qfcc/source/method.c b/tools/qfcc/source/method.c index a8be6332d..e24cd9e6f 100644 --- a/tools/qfcc/source/method.c +++ b/tools/qfcc/source/method.c @@ -273,8 +273,12 @@ emit_methods (methodlist_t *_methods, const char *name, int instance) if (!_methods) return 0; for (count = 0, method = _methods->head; method; method = method->next) - if (!method->instance == !instance) + if (!method->instance == !instance) { + if (!method->def) { + warning (0, "method %s not implemented", method->name); + } count++; + } if (!count) return 0; method_list = new_struct (0); @@ -289,7 +293,7 @@ emit_methods (methodlist_t *_methods, const char *name, int instance) methods->method_next = 0; methods->method_count = count; for (i = 0, method = _methods->head; method; method = method->next) { - if (!method->instance != !instance) + if (!method->instance != !instance || !method->def) continue; methods->method_list[i].method_name.sel_id = ReuseString (method->name); methods->method_list[i].method_name.sel_types = diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index 6b23062c0..5800a9adf 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -1104,7 +1104,7 @@ methoddef } | '-' methoddecl '=' '#' const ';' { - $2->instance = 0; + $2->instance = 1; $2 = class_find_method (current_class, $2); $2->def = method_def (current_class, $2);