Bug 137984 - [search] Field references not found when type is a qualified member type [regression]
Summary: [search] Field references not found when type is a qualified member type [reg...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-21 12:25 EDT by Frederic Fusier CLA
Modified: 2006-04-28 14:39 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (6.64 KB, patch)
2006-04-21 13:05 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2006-04-21 12:25:10 EDT
Using N20060421-0010 but already exists in 3.1.2

Consider following compilation unit C.java:
public class C {
	CC cc;
	CC.CCC z;
	C(int c) {
		cc = new CC(c);
		z = cc.new CCC(c);
	}
	class CC {
		CC(int x) {}
		class CCC {
			CCC(int x) {}
		}
	}
}

Select field cc in C and search for references: 1 match is found
=> OK
Select field z in C and search for references: no match is found
=> KO, we're expecting to find a reference in C constructor...

Note that it works if class C is a binary in a jar file with attached source...

Note also that this is a regression between 3.0 and 3.1 as it works correctly using 3.0.2 build.
Comment 1 Frederic Fusier CLA 2006-04-21 12:32:02 EDT
Regression was introduced while implementing search for generic types (bug 75641).
Philippe, do you think it's a good candidate for RC2?
Comment 2 Frederic Fusier CLA 2006-04-21 13:05:32 EDT
Created attachment 39189 [details]
Proposed patch

Personnaly I would this can be put in RC2 for several reasons:
1) it's a regression regarding 3.0, fix is just to put back previous behavior
2) fix is really small, no huge possible impact
3) even if there's some small unexpected impact, it would be reporting more matches as we add a '*' before field qualification type. It would be better than missing some matches as we currently do (note that renaming field z in the example will lead edited compilation unit with a compiler error !)
Comment 3 Philipe Mulet CLA 2006-04-25 06:31:49 EDT
+1 for 3.2RC2
Comment 4 Frederic Fusier CLA 2006-04-25 07:44:04 EDT
Patch released in HEAD.
Comment 5 Olivier Thomann CLA 2006-04-28 14:39:37 EDT
Verified with I20060427-1600 for 3.2RC2