Regression : Cannot define variable name which is the same to inner class name in JDK5u25

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 5.0u55
    • Affects Version/s: 5.0u25
    • Component/s: tools
    • Environment:

      JDK : 5u25(x64) and later
      OS : Windows7 unltimate(SP1, japanese, 64bits)

    • b01
    • x86
    • windows_7
    • Verified

      .java file can not define variable name which is the same to the innerclass name.

      TEST PROGRAM:
      ---
      class RegInnerClass
      {
        static class X { }
        X X = new X();
      }
      ---

      REPRODUCE:
      1. Compile the above test case
      2. Run "javac class RegInnerClass"

      C:\Users\licensees\javac-regression-5u25>javac -J-Duser.language=en RegInnerClass.java
      RegInnerClass.java:4: RegInnerClass.X is already defined in RegInnerClass
        X X = new X();
          ^
      1 error

      NOTE:
      This occurs in jdk5u25( and later jdk5ux), but not in JDK5u24(and former jdk5ux), jdk6ux, jdk7ux and jdk8b83.
      This seems regression in jdk5u25.

            Assignee:
            Dmeetry Degrave (Inactive)
            Reporter:
            Tadayuki Baba (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: