jdk-24/test/langtools/tools/javac/cycle/T8193561.java
Jan Lahoda ee0ac147a2 8193561: Cyclic hierarchy causes a NullPointerException when setting DEFAULT flag
When marking interface as having default methods, use .owner as it is always defined.

Reviewed-by: mcimadamore
2018-09-17 11:49:20 +02:00

22 lines
435 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8193561
* @summary Verify that there is no crash for default methods in mutually dependent interfaces
* @compile/fail/ref=T8193561.out -XDrawDiagnostics T8193561.java
*/
package p;
interface T8193561 extends p.T8193561.I {
interface I extends T8193561 {
default boolean m() {
return false;
}
}
default boolean m() {
return false;
}
}