RFR: bug: no warning shown for parameterized conversions [v2]
Vicente Romero
vromero at openjdk.java.net
Mon Mar 7 21:18:37 UTC 2022
On Mon, 7 Mar 2022 17:12:31 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> I'm not too convinced by this fix. Using warnStack seems really a workaround, and, on top of my head, I can't think of other code doing this. IMHO, universal vars introduce a new relation between types: `isBoundedBy`. What you want here is, essentially, a form to do `isBoundedByUnchecked` which should do strict check, followed by a looser one (like isSubtypeUnchecked does). There are many ways to do this, but it feels that having a better separation between these different routines could be, in the long term, a simplifying move (even if, in the short term it will create some code duplication). Because then we can fix the callsites to use the relationship we think is correct, depending on the case.
I'm not sure that `isSubtype` / `isSubtypeUnchecked` is the right analogy here as in most cases we get to the place where the warning is being issue in this PR without going through `isBoundedBy`
-------------
PR: https://git.openjdk.java.net/valhalla/pull/666
More information about the valhalla-dev
mailing list