Skip to content

Commit 7abcde2

Browse files
committed
Add missing onSourceCompiled callback
1 parent 2e46f3d commit 7abcde2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/src/dotty/tools/backend/jvm/GenBCode.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import dotty.tools.dotc.CompilationUnit
44
import dotty.tools.dotc.core.Phases.Phase
55
import dotty.tools.dotc.report
66
import dotty.tools.dotc.core._
7+
import dotty.tools.dotc.interfaces.CompilerCallback
78
import Contexts._
89
import Symbols._
910
import dotty.tools.io._
@@ -70,6 +71,10 @@ class GenBCode extends Phase { self =>
7071
// In Scala 3 we don't perform backend optimizations and though always post process without the delay
7172
// https://github.com/scala/scala/pull/6057
7273
postProcessor.postProcessAndSendToDisk(generated)
74+
(ctx.compilerCallback: CompilerCallback | Null) match {
75+
case cb: CompilerCallback => cb.onSourceCompiled(ctx.source)
76+
case null => ()
77+
}
7378

7479
override def runOn(units: List[CompilationUnit])(using ctx:Context): List[CompilationUnit] = {
7580
try super.runOn(units)

0 commit comments

Comments
 (0)