Skip to content

Commit 99ec6b3

Browse files
committed
Remove unused parameters of ThisRef
1 parent 46da4cd commit 99ec6b3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ class Checker extends Phase {
5555
mdef match
5656
case tdef: TypeDef if tdef.isClassDef =>
5757
val cls = tdef.symbol.asClass
58-
val ctor = cls.primaryConstructor
59-
val args = ctor.defTree.asInstanceOf[DefDef].termParamss.flatten.map(_ => Hot)
60-
val outer = Hot
61-
val thisRef = ThisRef(cls, outer, ctor, args)
58+
val thisRef = ThisRef(cls)
6259
given Trace = Trace.empty
6360
if shouldCheckClass(cls) then Semantic.addTask(thisRef)
6461
case _ =>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ object Semantic {
7373
}
7474

7575
/** A reference to the object under initialization pointed by `this` */
76-
case class ThisRef(klass: ClassSymbol, outer: Value, ctor: Symbol, args: List[Value]) extends Ref
76+
case class ThisRef(klass: ClassSymbol) extends Ref {
77+
val outer = Hot
78+
}
7779

7880
/** An object with all fields initialized but reaches objects under initialization
7981
*

0 commit comments

Comments
 (0)