< prev index next >
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
Print this page
@@ -1038,11 +1038,18 @@
/** Enter an inner class into the `innerClasses' set/queue.
*/
void enterInner(ClassSymbol c) {
if (c.type.isCompound()) {
- throw new AssertionError("Unexpected intersection type: " + c.type);
+ if (c.type.isIntersection()) {
+ types.directSupertypes(c.type).stream()
+ .map(t -> (ClassSymbol) t.tsym)
+ .forEach(this::enterInner);
+ return;
+ } else {
+ throw new AssertionError("Unexpected compound type: " + c.type);
+ }
}
try {
c.complete();
} catch (CompletionFailure ex) {
System.err.println("error: " + c + ": " + ex.getMessage());
< prev index next >