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

"Enclosing Instance" error new in 1.6

    Details

    • Subcomponent:
    • Introduced In Build:
      b73
    • Introduced In Version:
      6
    • Resolved In Build:
      b134
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      Verified

      Description

      FULL PRODUCT VERSION :
      javac 1.6.0_01

      ADDITIONAL OS VERSION INFORMATION :
      Win XP (SP2)

      A DESCRIPTION OF THE PROBLEM :
      This worked in 1.5

      public class Test {
          
          private abstract interface X {
              static abstract class Y {
                  private abstract class Z {}
              }
          }
          
          private static abstract class A {
              private static class B extends Test.X.Y {
                  private class C extends Test.X.Y.Z {}
              }
          }
          
          /** Creates a new instance of Test */
          public Test() {
          }
          
          /**
           * @param args the command line arguments
           */
          public static void main(String[] args) {
              // TODO code application logic here
          }
          
      }


      but not in 1.6 anymore:

      Test.java:24: an enclosing instance that contains Test.X.Y.Z is required
      private class C extends Test.X.Y.Z {}
      1 error



      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      not update to 1.6?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mcimadamore Maurizio Cimadamore
                Reporter:
                ndcosta Nelson Dcosta
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: