Bug 129804 - [dom] Local variable bindings from ASTParser#createASTs(.., String[], .., ..) have no declaring method
Summary: [dom] Local variable bindings from ASTParser#createASTs(.., String[], .., ..)...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.6 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-28 11:27 EST by Markus Keller CLA
Modified: 2010-04-26 12:05 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix + regression test (7.79 KB, patch)
2010-03-04 14:34 EST, Olivier Thomann CLA
no flags Details | Diff

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