RFR: JDK-8209022: Missing checkcast when casting to type parameter bounded by intersection type

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Sep 20 09:06:29 UTC 2018


Also copyright header in test seems stale (2013)

Maurizio


On 20/09/18 10:05, Maurizio Cimadamore wrote:
> Looks good.
>
> The test could be simplified either by using TestNG (which supports 
> assertions for exceptions), or by defining an helper function which 
> takes a Runnable. Then you can pass it two method references ::f and 
> ::g and the helper function could call them and check for exceptions.
>
> Maurizio
>
>
> On 20/09/18 02:10, Vicente Romero wrote:
>> Please review fix for [1] at [2]. Javac was `forgetting` to coerce 
>> some expressions to the target type after erasure. Implying that 
>> there were missing checkcasts generated in the byte code.
>>
>> Thanks,
>> Vicente
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8209022
>> [2]http://cr.openjdk.java.net/~vromero/8209022/webrev.00/jdk.dev.patch
>



More information about the compiler-dev mailing list