Bug 126160 - method from outer scope not resolved with erroneous arguments
Summary: method from outer scope not resolved with erroneous arguments
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.2 M5   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-02 05:46 EST by Markus Keller CLA
Modified: 2006-02-15 10:26 EST (History)
0 users

See Also:


Attachments

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