Bug 44506

Summary: Type hierarchy is missing anonymous type
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

Description Philipe Mulet CLA 2003-10-08 17:53:18 EDT
Build 20031008

- Define unit X.java:
- Open type on X
- Observe that the anonymous is not in the hierarchy.

public class X {
	// now wraps array initializers
	String[] str = {"aaa", "aaa", "aaa", "aaa", "aaa",
			"aaa", "aaa", "aaa", "aaa", "aaa", "aaa"};
	X(String s) {
	}
	protected void foo() {
		// now tolerate comments in anonymous
		X a = new X("") { //$NON-NLS-1$
			public void run() {
			}
		};
	}
}
Comment 1 Jerome Lanneluc CLA 2003-10-09 06:26:51 EDT
Created attachment 6384 [details]
Proposed fix

Resolve anonymous even if there is no corresponding constructor
Comment 2 Philipe Mulet CLA 2003-10-09 06:39:23 EDT
I have a slightly better version of this fix. Will release.
Please add a regression test.
Comment 3 Jerome Lanneluc CLA 2003-10-09 06:58:04 EDT
Added regression test TypeHierarchyTests.testAnonymousType6()
Comment 4 David Audel CLA 2003-10-10 07:25:47 EDT
Verified.