RFR: bug: no warning shown for parameterized conversions [v4]
Vicente Romero
vromero at openjdk.java.net
Thu Mar 10 00:56:54 UTC 2022
On Wed, 9 Mar 2022 09:50:42 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>>
>> renaming argument
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 4949:
>
>> 4947: private boolean containsTypeEquivalent(Type t, Type s) {
>> 4948: return isSameType(t, s) || // shortcut
>> 4949: containsType(t, s, containsTypeUnchecked) && containsType(s, t, containsTypeUnchecked);
>
> Is this the right replacement? It seems to me that the answer is "it depends". This is called both by "hasSameArgs" which is used to determine overriding (in which case a loose semantics could be ok), but also by the isSameType visitor - in which case the loose semantics should only be enabled conditionally.
yep you are right, fixed
-------------
PR: https://git.openjdk.java.net/valhalla/pull/666
More information about the valhalla-dev
mailing list