diff --git a/src/org/rascalmpl/core/library/lang/rascalcore/check/CheckerCommon.rsc b/src/org/rascalmpl/core/library/lang/rascalcore/check/CheckerCommon.rsc index b3a0181a..2e5fbe46 100644 --- a/src/org/rascalmpl/core/library/lang/rascalcore/check/CheckerCommon.rsc +++ b/src/org/rascalmpl/core/library/lang/rascalcore/check/CheckerCommon.rsc @@ -137,7 +137,9 @@ tuple[bool, Module, ModuleStatus] getModuleParseTree(str qualifiedModuleName, Mo ms.parseTreeLIFO = [qualifiedModuleName, *ms.parseTreeLIFO]; mloc = |unknown:///|; try { - mloc = getModuleLocation(qualifiedModuleName, pcfg); + mloc = getModuleLocation(qualifiedModuleName, pcfg); + // Make sure we found a real source module (as opposed to a tpl module in a library + if(mloc.extension != "rsc") throw ""; } catch _: { //ms.messages[qualifiedModuleName] ? [] = [error("Module not found", mloc)]; //ms.status[qualifiedModuleName] += {not_found()};