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

javac -target 1.2 produces bad access method calls

    XMLWordPrintable

Details

    • beta
    • generic, sparc
    • solaris_7, solaris_8
    • Verified

    Description

      frog$ cat -n Q2.java
           1 class AS {
           2 protected String o() { return "aso"; }
           3 }
           4
           5 public class Q2 {
           6 public class A extends AS {
           7 class Inner {
           8 void test() {
           9 A.super.o();
          10 }
          11 }
          12 A() {
          13 Inner i = new Inner();
          14 i.test();
          15 }
          16 }
          17
          18 public static void main(String[] args) {
          19 A a = new Q2().new A();
          20 }
          21 }
      frog$ javac1.4 -target 1.2 Q2.java
      + /usr/local/java/jdk1.4.0/solsparc/bin/javac -target 1.2 Q2.java
      frog$ java1.4 Q2
      + /usr/local/java/jdk1.4.0/solsparc/bin/java Q2
      Exception in thread "main" java.lang.NoSuchMethodError: AS.access$001(LQ2$A;)Ljava/lang/String;
      at Q2$A$Inner.test(Q2.java:9)
      at Q2$A.<init>(Q2.java:14)
      at Q2.main(Q2.java:19)
      frog$

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: