On Fri, 23 Jan 2026 19:02:22 GMT, Vicente Romero <[email protected]> wrote:

>> some of the null checks javac generates are redundant and can be removed
>
> Vicente Romero has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   minor change

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 4564:

> 4562:             owntype = cfolder.coerce(exprtype, owntype);
> 4563:         result = check(tree, capture(owntype), KindSelector.VAL, 
> resultInfo);
> 4564:         if (types.isNonNullable(clazztype) || tree.expr instanceof 
> JCTypeCast typeCast && typeCast.strict) {

bubble up the `strict` flag one strict cast make all chained casts strict

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1947#discussion_r2722470245

Reply via email to