Bug 44506 - Type hierarchy is missing anonymous type
Summary: Type hierarchy is missing anonymous type
Status: VERIFIED FIXED
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: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-08 17:53 EDT by Philipe Mulet CLA
Modified: 2003-10-10 07:25 EDT (History)
0 users

See Also:


Attachments
Proposed fix (1.76 KB, patch)
2003-10-09 06:26 EDT, Jerome Lanneluc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.