Skip to content

Commit 26a27cb

Browse files
authored
Merge pull request #13307 from dotty-staging/revert-rechecker
Revert "Merge pull request #12971 from dotty-staging/add-rechecker"
2 parents 12cb6c5 + e4fed5c commit 26a27cb

18 files changed

+17
-454
lines changed

compiler/src/dotty/tools/dotc/Compiler.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ class Compiler {
101101
new TupleOptimizations, // Optimize generic operations on tuples
102102
new LetOverApply, // Lift blocks from receivers of applications
103103
new ArrayConstructors) :: // Intercept creation of (non-generic) arrays and intrinsify.
104-
List(new PreRecheck) ::
105-
List(new TestRecheck) ::
106104
List(new Erasure) :: // Rewrite types to JVM model, erasing all type parameters, abstract types and refinements.
107105
List(new ElimErasedValueType, // Expand erased value types to their underlying implmementation types
108106
new PureStats, // Remove pure stats from blocks

compiler/src/dotty/tools/dotc/config/Printers.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ object Printers {
3838
val pickling = noPrinter
3939
val quotePickling = noPrinter
4040
val plugins = noPrinter
41-
val recheckr = noPrinter
4241
val refcheck = noPrinter
4342
val simplify = noPrinter
4443
val staging = noPrinter

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ private sealed trait YSettings:
239239
val YexplicitNulls: Setting[Boolean] = BooleanSetting("-Yexplicit-nulls", "Make reference types non-nullable. Nullable types can be expressed with unions: e.g. String|Null.")
240240
val YcheckInit: Setting[Boolean] = BooleanSetting("-Ysafe-init", "Ensure safe initialization of objects")
241241
val YrequireTargetName: Setting[Boolean] = BooleanSetting("-Yrequire-targetName", "Warn if an operator is defined without a @targetName annotation")
242-
val Yrecheck: Setting[Boolean] = BooleanSetting("-Yrecheck", "Run type rechecks (test only)")
243242

244243
/** Area-specific debug output */
245244
val YexplainLowlevel: Setting[Boolean] = BooleanSetting("-Yexplain-lowlevel", "When explaining type errors, show types at a lower level.")

compiler/src/dotty/tools/dotc/core/NamerOps.scala

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -177,24 +177,4 @@ object NamerOps:
177177
cls.registeredCompanion = modcls
178178
modcls.registeredCompanion = cls
179179

180-
/** For secondary constructors, make it known in the context that their type parameters
181-
* are aliases of the class type parameters. This is done by (ab?)-using GADT constraints.
182-
* See pos/i941.scala
183-
*/
184-
def linkConstructorParams(sym: Symbol)(using Context): Context =
185-
if sym.isConstructor && !sym.isPrimaryConstructor then
186-
sym.rawParamss match
187-
case (tparams @ (tparam :: _)) :: _ if tparam.isType =>
188-
val rhsCtx = ctx.fresh.setFreshGADTBounds
189-
rhsCtx.gadt.addToConstraint(tparams)
190-
tparams.lazyZip(sym.owner.typeParams).foreach { (psym, tparam) =>
191-
val tr = tparam.typeRef
192-
rhsCtx.gadt.addBound(psym, tr, isUpper = false)
193-
rhsCtx.gadt.addBound(psym, tr, isUpper = true)
194-
}
195-
rhsCtx
196-
case _ =>
197-
ctx
198-
else ctx
199-
200180
end NamerOps

compiler/src/dotty/tools/dotc/core/Phases.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,6 @@ object Phases {
295295
/** If set, implicit search is enabled */
296296
def allowsImplicitSearch: Boolean = false
297297

298-
/** If set equate Skolem types with underlying types */
299-
def widenSkolems: Boolean = false
300-
301298
/** List of names of phases that should precede this phase */
302299
def runsAfter: Set[String] = Set.empty
303300

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,6 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
745745
false
746746
}
747747
compareClassInfo
748-
case tp2: SkolemType =>
749-
ctx.phase.widenSkolems && recur(tp1, tp2.info) || fourthTry
750748
case _ =>
751749
fourthTry
752750
}

compiler/src/dotty/tools/dotc/transform/PreRecheck.scala

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)