On Fri, 9 Jan 2026 23:35:35 GMT, Vicente Romero <[email protected]> wrote:

> javac should generate a null check for code like:
> 
> 
> class Test {
>     public static void main(String... args) {
>         Object s = null;
>         Object o = (String & Runnable!) s; // NPE, cast
>     }
> }
> 
> the idea of the fix is to consider an intersection null restricted if at 
> least one of its components is null restricted

thanks for the review

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

PR Comment: https://git.openjdk.org/valhalla/pull/1881#issuecomment-3739691074

Reply via email to