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

spurious error message for compile that should fail

XMLWordPrintable

    • generic
    • generic

      THE ERROR MEASSAGE IS:

      WildcardCallRestrictions2.java:13: compiler message file broken: key=? super java.lang.String arguments={1}, {2}, {3}, {4}, {5}, {6}, {7}
                      str = con.deref(); // <<fail>>


      THE CODE IS:

       
      public class WildcardCallRestrictions2
      {
          public static void main(String[] args)
      {
      _Ref<? super String> con = null;
      String str = "Your hair is on fire!";
      str = con.deref(); // <<fail>>
          }
      }

      interface _Ref<Type>
      {
          public void setDefined(boolean def);
          public boolean isDefined();
          public void set(Type val);
          public Type deref();
      }

            gafter Neal Gafter (Inactive)
            ssides Steve Sides
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: