java 6 compiler bug or ...
maurizio cimadamore
maurizio.cimadamore at oracle.com
Mon Jun 6 03:07:38 PDT 2011
On 06/06/2011 09:31, Ali Ebrahimi wrote:
> 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
>
Hi Ali,
this is a JDK 6 bug that has been fixed in JDK 7 - as a result of a
merge, the lambda compiler picked up that fix.
Maurizio
More information about the lambda-dev
mailing list