Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Detecting breakage when upcasting #69

Open
lmove opened this issue Jul 21, 2020 · 1 comment
Open

Detecting breakage when upcasting #69

lmove opened this issue Jul 21, 2020 · 1 comment

Comments

@lmove
Copy link
Contributor

lmove commented Jul 21, 2020

In the API, we have class B that extends class A. Class A contains the method m(). In the client code, we have class C with method n(). In n(), we declare a variable of type A and we use B's constructor. Then we invoke method m().

public class C {
   public void n() {
      A obj = new B();
      obj.m();
   }
}

If B stops inheriting from A we get a compilation and linking error. We should detect these cases.

@lmove
Copy link
Contributor Author

lmove commented Jul 22, 2020

Getting the same problem in the InheritanceIfazeContractSuperinterfaceSetTest, MembersClazzNestedIfazeDeleteTest and membersIfazeNestedIfazeDeleteTest modules.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant