Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6910550

javac 1.5.0_17 fails with incorrect error message

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 5.0-pool
    • 5.0u17
    • tools
    • sparc
    • solaris_10

        JDK 5.0 Update 17 javac compiler fails with incorrect error message.

        The expected error message is:

        % /jdk1.5.0_16/bin/javac T.java
        T.java:14: name clash: m(java.util.List<java.lang.String>) and m(java.util.List<java.lang.Integer>) have the same erasure
          public void m(List<String> l1) {
                      ^
        T.java:18: name clash: m(java.util.List<java.lang.Integer>) and m(java.util.List<java.lang.String>) have the same erasure
          public void m(List<Integer> l2) {
                      ^
        2 errors
        %


        The observed error message is:

        % /jdk1.5.0_17/bin/javac T.java
        T.java:18: name clash: m(java.util.List<java.lang.Integer>) and m(java.util.List<java.lang.String>) have the same erasure
          public void m(List<Integer> l2) {
                      ^
        T.java:11: m(java.util.List<java.lang.String>) in T cannot be applied to (java.util.List<java.lang.Integer>)
            mc.m(l2);
              ^
        2 errors
        %

              poonam Poonam Bajaj Parhar
              thlenz Thomas Lenz (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: