No check for return-type substitutability

Issue #62 invalid
Jesper Öqvist created an issue

According to JLSv7 and JLSv7 8.5.4 an overriding method must be return-type substitutable for the method it is overriding. JastAddJ does not appear to check this currently.

Test case (should fail to compile):

class A {
        void m() { }

class Test extends A {
        /* Test.m() not return-type substitutable for A.m() */
        int m() {
                return -1;

Comments (1)

  1. Log in to comment