RFR: 8297974: ClassCastException in com.sun.tools.javac.comp.AttrRecover.doRecovery

Vicente Romero vromero at openjdk.org
Fri Dec 2 15:31:22 UTC 2022


On Fri, 2 Dec 2022 11:46:32 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> Considering code like:
> 
> class RecoveryTest {
> 
>     interface I {
>         int convert(int i);
>     }
> 
>     void t(I f, String e) {
>         t(param -> param); //a parameter missing here
>     }
> 
> }
> 
> 
> This is clearly wrong (the invocation of `t` is missing a parameter). But, running this crashes the compiler in addition to reporting the error:
> 
> $ javac -XDdev RecoveryTest.java

looks good

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

Marked as reviewed by vromero (Reviewer).

PR: https://git.openjdk.org/jdk/pull/11479


More information about the compiler-dev mailing list