Bug 31765 - private recursive methods not marked as unused
Summary: private recursive methods not marked as unused
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 32250 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-02-13 07:33 EST by Adam Kiezun CLA
Modified: 2003-03-10 11:32 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2003-02-13 07:33:28 EST
20030211
method foo should be marked as unused

class Test{
	private int foo(int i){
		if (i<=0) return 0;
		return 7 + foo(i-1);
	}
}
Comment 1 Philipe Mulet CLA 2003-02-13 08:12:16 EST
Post 2.1. Indirect recursions would be way more complex to address.
Comment 2 Philipe Mulet CLA 2003-02-19 12:21:24 EST
*** Bug 32250 has been marked as a duplicate of this bug. ***
Comment 3 Philipe Mulet CLA 2003-03-01 05:10:27 EST
May go for the direct case only.
Comment 4 Philipe Mulet CLA 2003-03-03 08:59:17 EST
Fixed in latest.
Comment 5 Philipe Mulet CLA 2003-03-03 09:08:29 EST
Made similar change to ignore references to a private type from within itself.
Comment 6 Philipe Mulet CLA 2003-03-03 09:23:14 EST
Also do not consider usage of private field from within inside itself.
Comment 7 Philipe Mulet CLA 2003-03-05 06:34:12 EST
Forgot to assign
Comment 8 Philipe Mulet CLA 2003-03-05 06:34:43 EST
Fixed
Comment 9 David Audel CLA 2003-03-10 11:32:45 EST
Verified.