Bug 42586 - Unused private type diagnosis should tolerate innerclass scenario
Summary: Unused private type diagnosis should tolerate innerclass scenario
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-05 06:12 EDT by Philipe Mulet CLA
Modified: 2003-09-05 07:00 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2003-09-05 06:12:05 EDT
Build 3.0M3

With unused private member diagnosis enabled, the following (slightly 
incorrect) code should not signal that the local type B is unused:

public class X { 
	public static class Y { 
		public Y(Z z) {} 
	} 
	public interface Z {} 
} 

class A { 
	private static class B extends X.Y implements X.Z { 
		B(A a) { 
			super(B.this); 
		} 
	} 
}
Comment 1 Philipe Mulet CLA 2003-09-05 07:00:45 EDT
Actually, the diagnosis is right, B is never referenced from the outside.