Skip to content

Commit c8c0d95

Browse files
committed
Halt when library has errors in FrontEnd.checkedLibraryReporter.
1 parent 46b93eb commit c8c0d95

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

frontend/shared/src/main/scala/org/sireum/lang/FrontEnd.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,16 @@ object FrontEnd {
343343

344344
val par = Ext.par
345345
val (tc, reporter) = libraryReporterPar(par)
346+
if (reporter.hasError) {
347+
reporter.printMessages()
348+
halt("Erroneous Slang library detected during outlining")
349+
}
346350
val th = tc.typeHierarchy
347351
val th2 = TypeChecker.checkComponents(par, T, th, th.nameMap, th.typeMap, reporter)
352+
if (reporter.hasError) {
353+
reporter.printMessages()
354+
halt("Erroneous Slang library detected during type checking")
355+
}
348356
return (TypeChecker(th2, ISZ(), F, TypeChecker.ModeContext.Code, T), reporter)
349357
}
350358

0 commit comments

Comments
 (0)