I am having those two classes in Eclipse 2020-09 and 2020-12:
Class A
package test;
public sealed class A permits B { }
Class B
package test;
import java.io.Serializable;
public final class B extends A implements Serializable { }
However, the eclipse compiler is giving me a compiler error in class B:
The type B extending a sealed class Serializable should be a permitted subtype of Serializable
This seems odd, as Serializable
isn't even a sealed class. I find nothing about that in JEP-360.
Removing "implements Serializable" resolves that error.
Is that a bug in the Eclipse compiler?
In case someone else is reading this:
My bug report has been fixed for Java 16.