Skip to content

Commit d3c0885

Browse files
retronymadriaanm
authored andcommitted
Don't minimize parents of java defined syms.
1 parent a9bebf8 commit d3c0885

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,13 @@ class BTypesFromSymbols[G <: Global](val global: G) extends BTypes {
234234

235235
val allParents = classParents ++ classSym.annotations.flatMap(newParentForAnnotation)
236236

237+
val minimizedParents = if (classSym.isJavaDefined) allParents else erasure.minimizeParents(allParents)
237238
// We keep the superClass when computing minimizeParents to eliminate more interfaces.
238239
// Example: T can be eliminated from D
239240
// trait T
240241
// class C extends T
241242
// class D extends C with T
242-
val interfaces = erasure.minimizeParents(allParents) match {
243+
val interfaces = minimizedParents match {
243244
case superClass :: ifs if !isInterfaceOrTrait(superClass.typeSymbol) =>
244245
ifs
245246
case ifs =>

0 commit comments

Comments
 (0)