mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-15 20:06:12 +00:00
[qfcc] Clean up error messages around superclass
This commit is contained in:
parent
66b8ab6890
commit
94e35b5f57
1 changed files with 7 additions and 3 deletions
|
@ -1589,9 +1589,13 @@ classdecl
|
||||||
class_name
|
class_name
|
||||||
: identifier %prec CLASS_NOT_CATEGORY
|
: identifier %prec CLASS_NOT_CATEGORY
|
||||||
{
|
{
|
||||||
$1 = check_undefined ($1);
|
if (!$1->type) {
|
||||||
if (!$1->type || !obj_is_class ($1->type)) {
|
$$ = get_class ($1, 1);
|
||||||
error (0, "`%s' is not a class %p", $1->name, $1->type);
|
if (!$1->table) {
|
||||||
|
symtab_addsymbol (current_symtab, $1);
|
||||||
|
}
|
||||||
|
} else if (!obj_is_class ($1->type)) {
|
||||||
|
error (0, "`%s' is not a class", $1->name);
|
||||||
$$ = get_class (0, 1);
|
$$ = get_class (0, 1);
|
||||||
} else {
|
} else {
|
||||||
$$ = $1->type->t.class;
|
$$ = $1->type->t.class;
|
||||||
|
|
Loading…
Reference in a new issue