java 6 compiler bug or ...

Ali Ebrahimi ali.ebrahimi1781 at gmail.com
Mon Jun 6 01:31:55 PDT 2011


Hi all,

This test case compiles with java 6 compiler, but current compiler rejects
that.

public class Test {

    static Integer call(List<String> ls) {
        System.out.println("ls");
        return 0;
    }

    static void call(List<List<String>> lls) {
        System.out.println("lls");
    }

    public static void main(String[] args) {

    }
}

current compiler error message:
error: name clash: call(List<List<String>>) and call(List<String>) have the
same erasure

Best Regards,
Ali Ebrahimi


More information about the lambda-dev mailing list