Skip to content

Commit 4ccba38

Browse files
committed
fix assertions in tests, fix compile error
1 parent fff9705 commit 4ccba38

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

Diff for: compiler/test/dotty/tools/DottyTest.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ trait DottyTest extends ContextEscapeDetection {
4444
fc.setProperty(ContextDoc, new ContextDocstrings)
4545
}
4646

47-
protected def defaultCompiler: Compiler = Compiler()
47+
protected def defaultCompiler: Compiler = new Compiler()
4848

4949
private def compilerWithChecker(phase: String)(assertion: (tpd.Tree, Context) => Unit) = new Compiler {
5050

Diff for: compiler/test/dotty/tools/dotc/sbt/ProgressCallbackTest.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ object ProgressCallbackTest:
145145
case class ProgressEvent(curr: Int, total: Int, currPhase: String, nextPhase: String)
146146
case class PhaseTransition(curr: String, next: String)
147147

148-
def asSubphases(phase: Phase): IArray[String] =
149-
val subPhases = Run.SubPhases(phase).all
150-
if subPhases.isEmpty then IArray(phase.phaseName)
151-
else subPhases
148+
def asSubphases(phase: Phase): IndexedSeq[String] =
149+
val subPhases = Run.SubPhases(phase)
150+
val indices = 0 until phase.traversals
151+
indices.map(subPhases.subPhase)
152152

153153
def runnablePhases()(using Context): IArray[Phase] =
154154
IArray.from(ctx.base.allPhases.filter(_.isRunnable))

Diff for: sbt-bridge/test/xsbt/CompileProgressSpecification.scala

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ class CompileProgressSpecification {
5454
"parser",
5555
"typer (indexing)", "typer (typechecking)", "typer (checking java)",
5656
"sbt-deps",
57-
"extractSemanticDB",
5857
"posttyper",
5958
"sbt-api",
6059
"SetRootTree",

0 commit comments

Comments
 (0)