mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
don't change the hidden parm type for protocol methods until they're used in a class
This commit is contained in:
parent
fa6f3cb09d
commit
2f4094344b
2 changed files with 8 additions and 1 deletions
|
@ -154,11 +154,17 @@ class_add_protocol_methods (class_t *class, expr_t *protocols)
|
|||
class->methods = new_methodlist ();
|
||||
|
||||
for (e = protocols; e; e = e->next) {
|
||||
method_t **m = class->methods->tail;
|
||||
if (!(p = get_protocol (e->e.string_val, 0))) {
|
||||
error (e, "undefined protocol `%s'", e->e.string_val);
|
||||
continue;
|
||||
}
|
||||
copy_methods (class->methods, p->methods);
|
||||
while (*m) {
|
||||
(*m)->params->type = class->type;
|
||||
printf("%s\n", (*m)->name);
|
||||
m = &(*m)->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1170,7 +1170,8 @@ methodproto
|
|||
| '-' methoddecl ';'
|
||||
{
|
||||
$2->instance = 1;
|
||||
$2->params->type = current_class->type;
|
||||
if (current_class)
|
||||
$2->params->type = current_class->type;
|
||||
$$ = $2;
|
||||
}
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue