jdk-24/test/langtools/tools/javac/sealed/erroneous_hierarchy/CyclicHierarchyTest.java
2023-11-16 16:41:58 +00:00

13 lines
389 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8319987
* @summary compilation of sealed classes leads to infinite recursion
* @compile/fail/ref=CyclicHierarchyTest.out -XDrawDiagnostics CyclicHierarchyTest.java
*/
class CyclicHierarchyTest {
sealed interface Action permits Add {}
sealed interface MathOp permits Add {}
sealed static class Add implements MathOp permits Add {}
}