RFR: addressing several issues in the implementation of universal tvars [v5]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Mon May 23 09:12:23 UTC 2022


On Sat, 21 May 2022 01:23:28 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> Last review iteration found several issues in the current implementation, addressing them here
>
> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
> 
>   missed a case in unchecked conversions

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 1824:

> 1822:                         return true;
> 1823:                     }
> 1824:                     return (allowUniversalTVars &&

This extra check feels outside the spirit of the rules discussed in https://openjdk.java.net/jeps/8261529.
That is, I'd expect type containment to recurse using `isBoundedBy` instead of `isSubtype` (as the first branch of this code does).

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

PR: https://git.openjdk.java.net/valhalla/pull/684



More information about the valhalla-dev mailing list