[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

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

              Created:
              Updated:
              Resolved: