File tree 1 file changed +18
-2
lines changed
src/compiler/scala/tools/nsc/backend/jvm
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1210,12 +1210,28 @@ abstract class BCodeTypes extends SubComponent with BytecodeWriters {
1210
1210
sups.distinct
1211
1211
};
1212
1212
1213
- assert(! superInterfaces.contains(NoSymbol ), " found NoSymbol among: " + superInterfaces.mkString)
1214
- assert(superInterfaces.forall(s => s.isInterface || s.isTrait), " found non-interface among: " + superInterfaces.mkString)
1213
+ def checkSuperIfaces () {
1214
+
1215
+ assert(! superInterfaces.contains(NoSymbol ), s " found NoSymbol among: ${prettyPrintFullnames(superInterfaces)}" )
1216
+
1217
+ val nonIfaces = superInterfaces.filter(s => ! s.isInterface && ! s.isTrait)
1218
+ assert(
1219
+ nonIfaces.isEmpty,
1220
+ s " found non-interfaces ${prettyPrintFullnames(nonIfaces)} among: ${prettyPrintFullnames(superInterfaces)}"
1221
+ )
1222
+
1223
+ }
1224
+
1225
+ checkSuperIfaces()
1215
1226
1216
1227
minimizeInterfaces(superInterfaces)
1217
1228
}
1218
1229
1230
+ def prettyPrintFullnames (syms : List [Symbol ]): String = {
1231
+ val lst = mapWithIndex(syms)({ case (sym, idx) => s " ( $idx : ${sym.fullName}) " })
1232
+ lst.mkString
1233
+ }
1234
+
1219
1235
final def exemplarIfExisting (iname : String ): Tracked = {
1220
1236
val bt = lookupRefBTypeIfExisting(iname)
1221
1237
if (bt != null ) exemplars.get(bt)
You can’t perform that action at this time.
0 commit comments