Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Keep going after errors in context

  • Loading branch information...
commit 7c16bf72f7a1e64894028980ed65b434b445ac32 1 parent 5ee5abe
Nick Gasson authored

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. +6 6 src/sem.c
12 src/sem.c
@@ -901,6 +901,7 @@ static bool sem_check_context(tree_t t)
901 901 return false;
902 902 }
903 903
  904 + bool ok = true;
904 905 for (unsigned n = 0; n < tree_contexts(t); n++) {
905 906 context_t c = tree_context(t, n);
906 907 ident_t all = ident_strip(c.name, ident_new(".all"));
@@ -908,14 +909,13 @@ static bool sem_check_context(tree_t t)
908 909 c.name = all;
909 910
910 911 lib_t lib = lib_find(istr(ident_until(c.name, '.')), true, true);
911   - if (lib == NULL)
912   - return false;
913   -
914   - if (!scope_import_unit(c, lib, all != NULL))
915   - return false;
  912 + if (lib != NULL)
  913 + ok = scope_import_unit(c, lib, all != NULL) && ok;
  914 + else
  915 + ok = false;
916 916 }
917 917
918   - return true;
  918 + return ok;
919 919 }
920 920
921 921 static bool sem_check_constrained(tree_t t, type_t type)

0 comments on commit 7c16bf7

Please sign in to comment.
Something went wrong with that request. Please try again.