<div dir="ltr"><div class="gmail_default" style="font-family:monospace">Am I missing something? Your first example does not compile.</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">I pulled down the early access 32 build, and the first example that you said compiles fine, doesn't.</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">Here is the link I downloaded from -- <a href="https://download.java.net/java/early_access/jdk20/32/GPL/openjdk-20-ea+32_windows-x64_bin.zip">https://download.java.net/java/early_access/jdk20/32/GPL/openjdk-20-ea+32_windows-x64_bin.zip</a></div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">Here is my java --version output.</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">    openjdk 20-ea 2023-03-21<br>    OpenJDK Runtime Environment (build 20-ea+32-2328)<br>    OpenJDK 64-Bit Server VM (build 20-ea+32-2328, mixed mode, sharing)</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">And here is my javac --version output.</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">    javac 20-ea</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">And then here is what happens when I try to compile your first example.</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">---------<br></div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">PotentialJavaBugs\src\main\java\io\github\davidalayachew\ShouldThisCompile.java:7: error: invalid permits clause<br>sealed interface Base<T> extends Uber<T> permits Foo, Bar, Other{}<br>                                                           ^<br>  (subclass Other<T> must extend sealed class)<br>  where T is a type-variable:<br>    T extends Object declared in record Other<br>PotentialJavaBugs\src\main\java\io\github\davidalayachew\ShouldThisCompile.java:10: error: class is not allowed to extend sealed class: Uber (as it is not listed in its permits clause)<br>record Other<T>() implements Uber<T>{}<br>^<br>PotentialJavaBugs\src\main\java\io\github\davidalayachew\ShouldThisCompile.java:25: error: incompatible types: Base<Integer> cannot be converted to Other<Integer><br>            case Other<Integer> o -> "Hello";<br>                 ^<br>PotentialJavaBugs\src\main\java\io\github\davidalayachew\ShouldThisCompile.java:39: error: incompatible types: Base<Integer> cannot be converted to Other<Integer><br>            case Other<Integer> o -> "Hello";<br>                 ^<br>PotentialJavaBugs\src\main\java\io\github\davidalayachew\ShouldThisCompile.java:45: error: incompatible types: Base<Integer> cannot be converted to Other<Integer><br>            case Other<Integer> o -> {<br>                 ^<br>Note: PotentialJavaBugs\src\main\java\io\github\davidalayachew\ShouldThisCompile.java uses preview features of Java SE 20.<br>Note: Recompile with -Xlint:preview for details.<br>5 errors</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">-----------<br></div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">Please let me know if I am missing something.</div></div>