Bug 311146 - [code assist] Autocast after instanceof feature doesnt work when completion is in a binary expression
Summary: [code assist] Autocast after instanceof feature doesnt work when completion i...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-30 05:19 EDT by Ayushman Jain CLA
Modified: 2010-04-30 05:19 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 Ayushman Jain CLA 2010-04-30 05:19:25 EDT
Build Identifier: I20100129-1300

Bug 304006 was originally opened to deal with problems in autocast after instanceof keyword. This bug is being opened to handle case (2) reported in bug 304006 to avoid bloating the fix for 304006 with too many cases. So this bug report pertains to 

"2) It doesnt work when used in conjunction with binary expressions ( ==, != ,
&&, ||, &, | ) , viz.

class X {
   void methodFromX(){}
   void foo(Object a){
      int i = 1;
      if(a instanceof X){
         if(i == 1 && a.[CTRL-SPACE]) {
             // EXPECTED PROPOSAL : methodFromX, and if accepted also a cast to
X
             // However, we dont get this currently
         }
       }
    }
}
We can change the && with any other binary expression in the above code, and we
still dont get the required proposal." (Quoting from bug 304006).



Reproducible: Always

Steps to Reproduce:
1.Use the above source
2.Press CTRL-SPACE where indicated
3.See that no proposals from the class X are shown.