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

Please improve error message regarding members of raw supertypes

    • generic
    • generic

      Consider the program:

           1 import java.util.List;
           2 class A<E> {
           3 public void x(List<String> s) { }
           4 }
           5 class B extends A/*raw!*/ {
           6 public void x(List<String> s) { }
           7 }

      Which produces this error message:

      A.java:5: name clash: x(java.util.List<java.lang.String>) in B and x(java.util.List<java.lang.String>) in A have the same erasure, yet neither overrides the other
      class B extends A/*raw!*/ {
      ^
      1 error

      The error is correct but the message could be improved:

      A.java:5: name clash: x(java.util.List<java.lang.String>) in B and x(java.util.List) in A have the same erasure, yet neither overrides the other
      class B extends A/*raw!*/ {
      ^
      1 error

      See http://forum.java.sun.com/thread.jspa?forumID=316&threadID=653504

            Unassigned Unassigned
            ahe Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: