Skip to content

Commit

Permalink
* Regression test for
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanth-sankaran committed Jun 13, 2024
1 parent a365a11 commit 5fade18
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5877,4 +5877,26 @@ public static void main(String [] args) {
},
"Compiled and ran fine!");
}

// https://bugs.eclipse.org/bugs/show_bug.cgi?id=576471
// Sealed type hierarchy doesn't compile if there are redundant type references
public void testBug576471() {
runConformTest(
new String[] {
"X.java",
"""
public class X {
public sealed interface I permits IA, C1, C2 {}
public sealed interface IA extends I permits A {}
public abstract sealed class A implements IA permits C1, C2 {}
public final class C1 extends A implements I {}
public final class C2 extends A implements I {}
public static void main(String [] args) {
System.out.println("Compiled and ran fine!");
}
}
"""
},
"Compiled and ran fine!");
}
}

0 comments on commit 5fade18

Please sign in to comment.