mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-30 16:30:43 +00:00
give an error message instead of segging for the following code:
@class foo; @interface bar : foo @end
This commit is contained in:
parent
fade4419f7
commit
35d690c701
1 changed files with 10 additions and 3 deletions
|
@ -506,9 +506,16 @@ struct_t *
|
||||||
class_new_ivars (class_t *class)
|
class_new_ivars (class_t *class)
|
||||||
{
|
{
|
||||||
struct_t *ivars = new_struct (0);
|
struct_t *ivars = new_struct (0);
|
||||||
if (class->super_class)
|
if (class->super_class) {
|
||||||
new_struct_field (ivars, class->super_class->ivars->type, 0,
|
if (!class->super_class->ivars) {
|
||||||
vis_private);
|
error (0, "cannot find interface declaration for `%s', "
|
||||||
|
"superclass of `%s'", class->super_class->name,
|
||||||
|
class->name);
|
||||||
|
} else {
|
||||||
|
new_struct_field (ivars, class->super_class->ivars->type, 0,
|
||||||
|
vis_private);
|
||||||
|
}
|
||||||
|
}
|
||||||
return ivars;
|
return ivars;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue