javac throws NullPointerException when the Wrong Program was compiled.

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Tue Nov 29 05:20:18 PST 2011


Thanks for the test case - I'm working on it.

Maurizio

On 29/11/11 13:06, 苦狐 wrote:
> public class Main
> {
>     public /*static*/ class Class1 // NOT static
>     {}
>
>     public interface Constructor0<RET>
>     {
>         public RET createInstance();
>     }
>
>     public static void main(String[] args)
>     {
>         // Illegal Constructor Reference
>         Constructor0<Class1> c = Main.Class1#new; // should be Compile
> Error, NOT Compiler's Exception
>     }
> }



More information about the lambda-dev mailing list