Community
Participate
Working Groups
20030211 class A{ public void f(){} } class B extends A{} class C{ void foo(A a){ a.f(); } } pushing A.f to B will result in compile error since we don't want downcasts (and, in general when there's more than 1 subclass of A, there's nothing to donwcast to), we should detect this case and issue an error
Not critical for 2.1, since we get a compile error.
Detecting this case requires scanning all references to the method to be pushed down and check if the expression on which they are called is at least of type B. Instead of issue a warning I would prefer a button that computes all methods that must stay abstract.
*** This bug has been marked as a duplicate of bug 211861 ***