We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2246b9 commit 51fcc1fCopy full SHA for 51fcc1f
src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala
@@ -251,7 +251,11 @@ class BTypesFromSymbols[G <: Global](val global: G) extends BTypes {
251
// class C extends Object with A // minimizeParents removes Object
252
ifs
253
}
254
- interfaces.map(_.typeSymbol)
+ // Add all mixin traits as direct parents of classes so we can emit arbitrary super calls to default methods with invokespecial
255
+ // TODO also reflect this in the generic signatures (?)
256
+ val mixinTraitsOfClass = if (!classSym.isJavaDefined && !classSym.isTrait) classSym.ancestors.filter(_.isTrait) else Nil
257
+ (interfaces.map(_.typeSymbol) ::: mixinTraitsOfClass).distinct
258
+
259
260
261
/**
0 commit comments