The compiler rejects <void>this/super().

bitter_fox bitterfoxc at gmail.com
Thu Mar 8 01:46:54 PST 2012


Hi,
The compiler rejects "void" for throws generics at "this" or "super"
constructor invoking:

public class Main
{
    public <throws E> Main(Object o) {}

    public Main()
    {
        <void>this(null); // Illegal
    }
}

The error message:
Main.java:8: error: illegal start of type
                <void>this(null);
                 ^
Regards,
bitter_fox


More information about the lambda-dev mailing list