Skip to content

Commit 86965af

Browse files
authored
Merge pull request #12561 from dotty-staging/remove-old-init
Remove old init checker
2 parents 450f8ac + 2d86ca2 commit 86965af

File tree

14 files changed

+61
-1559
lines changed

14 files changed

+61
-1559
lines changed

compiler/src/dotty/tools/dotc/transform/init/Cache.scala

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

compiler/src/dotty/tools/dotc/transform/init/Checker.scala

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ class Checker extends MiniPhase {
2323

2424
val phaseName = "initChecker"
2525

26-
// cache of class summary
27-
private val cache = new Cache
28-
2926
private val semantic = new Semantic
3027

3128
override val runsAfter = Set(Pickler.name)
@@ -49,18 +46,6 @@ class Checker extends MiniPhase {
4946

5047
// A concrete class may not be instantiated if the self type is not satisfied
5148
if (instantiable && cls.enclosingPackageClass != defn.StdLibPatchesPackage.moduleClass) {
52-
implicit val state: Checking.State = Checking.State(
53-
visited = Set.empty,
54-
path = Vector.empty,
55-
thisClass = cls,
56-
fieldsInited = mutable.Set.empty,
57-
parentsInited = mutable.Set.empty,
58-
safePromoted = mutable.Set.empty,
59-
env = Env(ctx.withOwner(cls), cache)
60-
)
61-
62-
// Checking.checkClassBody(tree)
63-
6449
import semantic._
6550
val tpl = tree.rhs.asInstanceOf[Template]
6651
val thisRef = ThisRef(cls)

0 commit comments

Comments
 (0)