Community
Participate
Working Groups
Using 0218, I found a case where I would still expect the private method to be unused. 1) Create a class A with the following code: public class A { private void foo() { } } 2) Set the compiler to report an error for unused private methods. 3) You get an error for foo(). 4) Now replace it with this code: public class A { private void foo() { foo(); } } 5) You don't get an error anymore, but clearly the method foo could be removed, because it is used only in foo. I am not sure if this is a bug or an enhancement.
Yes, we don't deal with direct recursions (would be harder to detect indirect recursions).
see bug 31765 i understand that indirect is a problem but even detecting direct recursion would be an improvement
Maybe we should only consider direct recursions. *** This bug has been marked as a duplicate of 31765 ***