Bug 23593 - search: strange method reference match found
Summary: search: strange method reference match found
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-16 06:02 EDT by Adam Kiezun CLA
Modified: 2002-10-07 08:40 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 Adam Kiezun CLA 2002-09-16 06:02:36 EDT
I think it's quite strange that the method invocation in Test::test should be 
reported as a reference match to S::f()

public class S implements I {
  	public void f() {}
}
class S1 implements I{
  	public void f() {}
}
interface I {
	void f();
}

class Test{
	void test(){
		I i= new S1();
		i.f();
	}
}
Comment 1 Jerome Lanneluc CLA 2002-10-03 09:22:11 EDT
We cannot staticaly determine that 'i' is a S1 and not a S. If you had this 
code:
  I i= new S();
  i.f();
then you would want to find the reference to S.f().

OK to close?
Comment 2 Jerome Lanneluc CLA 2002-10-07 08:40:44 EDT
Closing.