Skip to content

Commit 340eab9

Browse files
author
EnzeXing
committed
Adding comment for secondary constructor returns
1 parent 3ae39e3 commit 340eab9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,6 @@ object Objects:
228228

229229
val Bottom = RefSet(ListSet.empty)
230230

231-
// type ThisValue = Ref | Cold // used for typing thisV, whose value can only be Ref or Cold
232-
// type VEOrCold = ValueElement | Cold
233-
234231
/** Checking state */
235232
object State:
236233
class Data:
@@ -726,7 +723,7 @@ object Objects:
726723
val tpl = cls.defTree.asInstanceOf[TypeDef].rhs.asInstanceOf[Template]
727724
extendTrace(cls.defTree) { eval(tpl, ref, cls, cacheResult = true) }
728725
else
729-
extendTrace(ddef) {
726+
extendTrace(ddef) { // The return values for secondary constructors can be ignored
730727
Returns.installHandler(ctor)
731728
eval(ddef.rhs, ref, cls, cacheResult = true)
732729
Returns.popHandler(ctor)

0 commit comments

Comments
 (0)