Bug 126160

Summary: method from outer scope not resolved with erroneous arguments
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.2   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2006-02-02 05:46:25 EST
I20060131-1200

In the code below, the identifier xxx is not defined. Still, the first call 'called(xxx)' gets a method binding for the matching method, and codeSelect (F3) works to jump to the declaration.

The same unfortunately does not work from inside an inner class. It would be convenient if we could get a guessed binding there too, so that the user can still jump to the declaration even with incomplete code.

    void user() {
        called(xxx);
        new Runnable(){
            public void run() {
                called(xxx); // 'called' has no binding, codeSelect doesn't work
            }
        };
    }
    
    void called(String arg) { }
Comment 1 Philipe Mulet CLA 2006-02-02 06:32:25 EST
David - pls investigate, and show it to me.
Comment 2 David Audel CLA 2006-02-06 04:53:04 EST
Fixed and test added
  ResolveTests#testMethodWithIncorrectParameter2()

Scope.resolveType(BlockScope) didn't find methods in enclosing type when arguments can't be resolved.
Comment 3 Frederic Fusier CLA 2006-02-15 10:26:44 EST
Verified for 3.2 M5 using build I20060215-0010.