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

[lworld] javac is rejecting valid code after fix for JDK-8359370

XMLWordPrintable

      Recent fix for JDK-8359370 introduced a minor bug. This code should be accepted by javac:

      class SuperClass<T> {
          public SuperClass(Object o) {}
      }

      class Sub<T> extends SuperClass<T> {
          public Sub() {
              super(new Object() {
                  void foo() {
                      getClass();
                  }
              });
          }
      }

      but it is currently rejected as the getClass invocation is considered to be an invocation of an instance method of class Sub

            vromero Vicente Arturo Romero Zaldivar
            dsimms David Simms
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: