Skip to content

Commit

Permalink
Fixed error reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Mar 11, 2024
1 parent c8226f5 commit d12b796
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/analysis/typepal/Solver.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -1502,13 +1502,8 @@ Solver newSolver(map[str,Tree] namedTrees, TModel tm){
tm.config.postSolver(namedTrees, thisSolver);

// Convert all FaillMessages into Messages
error_locations = {};
for(fm <- failMessages){
msg = toMessage(fm, getType);
if(error(_,src) := msg){
error_locations += src;
}
messages += msg;
for(fm <- failMessages){
messages += toMessage(fm, getType);
}

for(Use u <- openUses){
Expand All @@ -1524,6 +1519,8 @@ Solver newSolver(map[str,Tree] namedTrees, TModel tm){
roles = size(u.idRoles) > 5 ? "" : intercalateOr([prettyRole(idRole) | idRole <- u.idRoles]);
messages += error("Undefined <roles> `<getOrgId(u)>`", u.occ);
}

error_locations = { src | error(_,loc src) <- messages };

for(rp <- referPaths){
switch(rp){
Expand Down

0 comments on commit d12b796

Please sign in to comment.