Another bug fix for recent import * warning (caught by Thomas Wouters)
Only return if symtable_warn() returns -1, indicating that the warning was turned into an error.
This commit is contained in:
parent
ae5262ef32
commit
6a53bd8582
|
@ -5295,9 +5295,9 @@ symtable_import(struct symtable *st, node *n)
|
||||||
}
|
}
|
||||||
if (TYPE(CHILD(n, 3)) == STAR) {
|
if (TYPE(CHILD(n, 3)) == STAR) {
|
||||||
if (st->st_cur->ste_type != TYPE_MODULE) {
|
if (st->st_cur->ste_type != TYPE_MODULE) {
|
||||||
symtable_warn(st,
|
if (symtable_warn(st,
|
||||||
"import * only allowed at module level");
|
"import * only allowed at module level") < 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
st->st_cur->ste_optimized |= OPT_IMPORT_STAR;
|
st->st_cur->ste_optimized |= OPT_IMPORT_STAR;
|
||||||
st->st_cur->ste_opt_lineno = n->n_lineno;
|
st->st_cur->ste_opt_lineno = n->n_lineno;
|
||||||
|
|
Loading…
Reference in New Issue