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

incorrect ambiguous variable reference error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 5.0
    • 1.4.2
    • tools
    • tiger
    • generic
    • solaris_8

      javac fails the following jacks test


      ==== 6.5.6.2-type-9 A qualified expression name which is qualified
              by a type name must name a single accessible field of that type, which
              must be static FAILED
      ==== Contents of test case:

          compile [saveas p1/T6562t9c.java {
      package p1;
      class T6562t9a {
          protected int i;
      }
      interface T6562t9b {
          int i = 1;
      }
      public class T6562t9c extends T6562t9a implements T6562t9b {}
          }] [saveas T6562t9d.java {
      class T6562t9d extends p1.T6562t9c {
          // since a.i is an instance field, and qualifier is not d or subclass,
          // only b.i is accessible
          int i = p1.T6562t9c.i;
      }
          }]

      ---- Result was:
      FAIL
      ---- Result should have been:
      PASS
      ==== 6.5.6.2-type-9 FAILED

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: