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

Legal cast rejected

XMLWordPrintable

    • generic
    • generic

      This program doesn't compile

      public class X {

          public interface SuperInterface<A> {
          }

          public interface SubInterface extends SuperInterface<String> {
              public String getString();
          }

          private SuperInterface< ? extends SuperInterface> x = null;

          public void f() {
              ((SubInterface) this.x).getString();
          }
      }

      ###@###.### 2005-06-08 16:13:28 GMT

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: