RFR: 8282823: javac should constrain more uses of preview APIs

Maurizio Cimadamore mcimadamore at openjdk.java.net
Fri Mar 11 11:30:42 UTC 2022


On Thu, 10 Mar 2022 12:28:27 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> Consider a class or interface with a method marked as preview. Subclassing the class or implementing the interface by itself should not cause a preview error/warning (as that would be problematic for Loom), but overriding the method should produce a preview error/warning.
> 
> This patch adds the error/warning in case a preview method is overridden.

If the goal is (as it seems) to detect first override of a preview method, then these changes look good. Thanks Alex for the clarification.

-------------

Marked as reviewed by mcimadamore (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7774


More information about the compiler-dev mailing list