@@ -31,15 +31,6 @@ class TyperPhase(addRootImports: Boolean = true) extends Phase {
3131
3232 override def allowsImplicitSearch : Boolean = true
3333
34- /** The contexts for compilation units that are parsed but not yet entered */
35- private var remaining : List [Context ] = Nil
36-
37- /** Does a source file ending with `<name>.scala` belong to a compilation unit
38- * that is parsed but not yet entered?
39- */
40- def stillToBeEntered (name : String ): Boolean =
41- remaining.exists(_.compilationUnit.toString.endsWith(name + " .scala" ))
42-
4334 // Run regardless of parsing errors
4435 override def isRunnable (implicit ctx : Context ): Boolean = true
4536
@@ -68,13 +59,6 @@ class TyperPhase(addRootImports: Boolean = true) extends Phase {
6859 JavaChecks .check(unit.tpdTree)
6960 }
7061
71-
72- private def firstTopLevelDef (trees : List [tpd.Tree ])(using Context ): Symbol = trees match
73- case PackageDef (_, defs) :: _ => firstTopLevelDef(defs)
74- case Import (_, _) :: defs => firstTopLevelDef(defs)
75- case (tree @ TypeDef (_, _)) :: _ => tree.symbol
76- case _ => NoSymbol
77-
7862 protected def discardAfterTyper (unit : CompilationUnit )(using Context ): Boolean =
7963 unit.isJava || unit.suspended
8064
@@ -89,11 +73,9 @@ class TyperPhase(addRootImports: Boolean = true) extends Phase {
8973 else
9074 newCtx
9175
92- remaining = unitContexts
93- while remaining.nonEmpty do
94- enterSyms(using remaining.head)
95- remaining = remaining.tail
96- val firstXmlPos = ctx.base.parserPhase match {
76+ unitContexts.foreach(enterSyms(using _))
77+
78+ ctx.base.parserPhase match {
9779 case p : ParserPhase =>
9880 if p.firstXmlPos.exists && ! defn.ScalaXmlPackageClass .exists then
9981 report.error(
0 commit comments