Bug 23594 - code resolve: incorrectly resolving method invocation
Summary: code resolve: incorrectly resolving method invocation
Status: VERIFIED FIXED
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: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-16 06:10 EDT by Adam Kiezun CLA
Modified: 2002-10-17 10:17 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:10:28 EDT
abstract class A implements I{
}
interface I{
  void f();
}
class Test{
 void test(A a){
   a.f();
 }
}

try resolving the method call to f() in Test::test - instead of the exprected 
I::f() you get the class A (that's what it looks like in the ui)
Comment 1 Olivier Thomann CLA 2002-09-16 09:52:20 EDT
Is this a problem with DOM/AST?
Comment 2 Adam Kiezun CLA 2002-09-16 09:57:16 EDT
i don't know if ast has a problem here too.

i noticed it when i pressed F3 on the method invocation expression
Comment 3 Philipe Mulet CLA 2002-09-19 08:35:42 EDT
This is because of default abstract methods. I bet you it works fine if you 
toggle compiler compliance to 1.4 (since in 1.4 we don't generate them anymore).

Indeed CodeSelect should ignore default abstract methods.
Comment 4 David Audel CLA 2002-10-01 05:03:10 EDT
SelectionOnMessageSend search the method in superinterfaces if the found method 
is default abstract.

fixed.
Comment 5 David Audel CLA 2002-10-17 10:17:55 EDT
Verified.