RFR: fixing bugs in inference and type system more regression tests
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Fri Feb 18 11:09:27 UTC 2022
On Fri, 18 Feb 2022 00:55:43 GMT, Vicente Romero <vromero at openjdk.org> wrote:
> this PR is adapting Types::glb so that it can deal with primitive classes. It also fixes a bug in inference, basically we are now failing during overload resolution if any undetVar has a bound that is a primitive class. But a bug was making inference fail after overload resolution in some cases.
Looks good. I think we should add more tests - e.g. you want to check that, given two primitive types P1 and P2 which both extend a common superinterface I, then:
* lub(P1, P2) == lub(P1, I) == lub(P2, I) == I.
* lub(P1, P1.ref) = P1.ref
* glb(P1, P1.ref) = P1
* glb(P1, I) == P1
* glb(P1.ref, I) == P1.ref
* glb(P2, I) == P2
* glb(P2.ref, I) == P2.ref
-------------
PR: https://git.openjdk.java.net/valhalla/pull/654
More information about the valhalla-dev
mailing list