Bug 129804

Summary: [dom] Local variable bindings from ASTParser#createASTs(.., String[], .., ..) have no declaring method
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: Olivier_Thomann
Version: 3.2   
Target Milestone: 3.6 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix + regression test none

Description Markus Keller CLA 2006-02-28 11:27:23 EST
I20060223-1656

public class Try {
    void m() {
        Object o;
    }
}

Get the binding key from the local variable o and pass it to ASTParser#createASTs(.., String[], .., ..).
=> The resolved binding returns null on #getDeclaringMethod()

-> The resolved binding returns null on #getJavaElement(), although the original binding from the AST returned an ILocalVariable.
-> Also, Binding#isEqualTo(..) returns false when comparing the original an the resolved binding.
Comment 1 Jerome Lanneluc CLA 2006-03-02 06:01:28 EST
Added disabled regression test BatchASTCreationTests#_test072()
Comment 2 Jerome Lanneluc CLA 2007-06-21 12:03:58 EDT
BatchASTCreationTests#_test072() still failing with 3.3RC4
Comment 3 Jerome Lanneluc CLA 2008-05-07 10:50:25 EDT
Deferring again
Comment 4 Olivier Thomann CLA 2010-03-04 14:34:48 EST
Created attachment 161014 [details]
Proposed fix + regression test
Comment 5 Olivier Thomann CLA 2010-03-12 19:18:24 EST
Released for 3.6M6.
Comment 6 Frederic Fusier CLA 2010-04-26 12:05:02 EDT
Verified for 3.6M7 using I20100425-2000.