Missing bridge method generation for final method

Issue #265 resolved
Jesper Öqvist
created an issue

ExtendJ 8.1.0-19-g5c20689 Java SE 8

ExtendJ fails to generate a necessary bridge method for the method X.x() in this test:

public class An5 {
  public static void main(String[] args) {
    System.out.println(foo(new X()));
  }

  static Object foo(S s) {
    return s.x();
  }
}

class S {
  Object x() {
    return null;
  }
}
class X extends S {
  @Override
  final X x() {
    return this;
  }
}

Expected result: the compiled program should print ok

Actual result: the program prints null

Comments (2)

  1. Log in to comment