mske sure .self and .this are defined in progs.src mode (ie, @self and

@this)
This commit is contained in:
Bill Currie 2003-10-22 21:49:47 +00:00
parent 2290ed3d3e
commit 7ef80d1da2

View file

@ -405,8 +405,14 @@ finish_compilation (void)
for (d = pr.scope->head; d; d = d->def_next) {
if (d->external && d->refs) {
errors = true;
error (0, "undefined global %s", d->name);
if (strcmp (d->name, ".self") == 0) {
get_def (d->type, ".self", pr.scope, st_global);
} else if (strcmp (d->name, ".this") == 0) {
get_def (d->type, ".this", pr.scope, st_global);
} else {
errors = true;
error (0, "undefined global %s", d->name);
}
}
}
if (errors)