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

comiler should generate error but doesn't

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.2.0
    • tools
    • x86
    • windows_nt



      Name: clC74495 Date: 05/13/99


      --- expected:
      compile error at line 7

      --- actual:
        compile: OK
        execute:
      Outer3@77263604
      Outer3.this = null
      Outer3.this = Outer3@77263604

      --- X.java
      class Outer3 {
      class Nested3 {
      Nested3() {
      super();
      }
      Nested3(String o) {
      o.super(); // should be error
      }

      void g() {
      System.out.println("Outer3.this = " + Outer3.this);
      }
      }

      void f() {
      System.out.println(this);
      new Nested3("hello").g();
      new Nested3().g();
      }

      public static void main(String[] args) {
      new Outer3().f();
      }
      }
      (Review ID: 63137)
      ======================================================================

            wmaddoxsunw William Maddox (Inactive)
            clucasius Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: