From d12b7965342ccbb3817106bc63f63a1a61254eeb Mon Sep 17 00:00:00 2001 From: paulklint Date: Mon, 11 Mar 2024 16:53:12 +0100 Subject: [PATCH] Fixed error reduction --- src/analysis/typepal/Solver.rsc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/analysis/typepal/Solver.rsc b/src/analysis/typepal/Solver.rsc index 0320267..8b8ad9c 100644 --- a/src/analysis/typepal/Solver.rsc +++ b/src/analysis/typepal/Solver.rsc @@ -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){ @@ -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 ``", u.occ); } + + error_locations = { src | error(_,loc src) <- messages }; for(rp <- referPaths){ switch(rp){