Skip to content

Commit ecac7b3

Browse files
committed
Drop AnyRef parent generation in DeSugar.
As of previous commit, Namer will take care of it.
1 parent 38b3626 commit ecac7b3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,11 @@ object desugar {
229229
New(AppliedTypeTree(tycon, targs), Nil)
230230
}
231231

232-
// The desugared parents: AnyRef, in case parents are Nil.
233-
// Case classes also get a ProductN parent
232+
// Case classes get a ProductN parent
234233
var parents1 = parents
235234
val n = vparamss.head.length
236235
if ((mods is Case) && 2 <= n && n <= Definitions.MaxTupleArity)
237236
parents1 = parents1 :+ productConstr(n)
238-
if (parents.isEmpty)
239-
parents1 = New(anyRef, Nil) :: parents1
240237

241238
// The thicket which is the desugared version of the companion object
242239
// synthetic object C extends parentTpt { defs }

0 commit comments

Comments
 (0)