Skip to content

Commit d5414d6

Browse files
committed
Run final Inspector callback only once when exns happen
1 parent 3100c58 commit d5414d6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tasty-inspector/src/scala/tasty/inspector/TastyInspector.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ trait TastyInspector:
9999

100100
override def run(implicit ctx: Context): Unit =
101101
if !alreadyRan then
102-
val qctx = QuoteContextImpl()
103-
self.finishProcessingCompilationUnits(using qctx)
104-
alreadyRan = true
102+
try
103+
val qctx = QuoteContextImpl()
104+
self.finishProcessingCompilationUnits(using qctx)
105+
finally
106+
alreadyRan = true
105107

106108
var alreadyRan = false
107109
end TastyInspectorFinishPhase

0 commit comments

Comments
 (0)