Permalink
Browse files

Keep going after errors in context

  • Loading branch information...
1 parent 5ee5abe commit 7c16bf72f7a1e64894028980ed65b434b445ac32 @nickg committed Mar 27, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/sem.c
View
12 src/sem.c
@@ -901,21 +901,21 @@ static bool sem_check_context(tree_t t)
return false;
}
+ bool ok = true;
for (unsigned n = 0; n < tree_contexts(t); n++) {
context_t c = tree_context(t, n);
ident_t all = ident_strip(c.name, ident_new(".all"));
if (all)
c.name = all;
lib_t lib = lib_find(istr(ident_until(c.name, '.')), true, true);
- if (lib == NULL)
- return false;
-
- if (!scope_import_unit(c, lib, all != NULL))
- return false;
+ if (lib != NULL)
+ ok = scope_import_unit(c, lib, all != NULL) && ok;
+ else
+ ok = false;
}
- return true;
+ return ok;
}
static bool sem_check_constrained(tree_t t, type_t type)

0 comments on commit 7c16bf7

Please sign in to comment.