Skip to content

Commit 69e8f19

Browse files
committed
Handle suspended units in InteractiveDriver
1 parent a53939c commit 69e8f19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class InteractiveDriver(val settings: List[String]) extends Driver {
155155

156156
run.compileSources(List(source))
157157
run.printSummary()
158-
val unit = ctx.run.units.head
158+
val unit = if ctx.run.units.nonEmpty then ctx.run.units.head else ctx.run.suspendedUnits.head
159159
val t = unit.tpdTree
160160
cleanup(t)
161161
myOpenedTrees(uri) = topLevelTrees(t, source)

0 commit comments

Comments
 (0)