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

soundness problem with failure to subsitute wildcard as type formal argument

XMLWordPrintable

    • b49
    • generic
    • solaris_8

      javac improperly accepts the following code.

      ////////////////////////////////////////////////////
      class R<T extends R<T>> {
          T f() { return null; }
          T t;

          void x(R<?> r) {
              this.t = r.f().t; // this should be an error!
          }
      }

            ahe Peter Ahe
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: