Bug 99928

Summary: ContentAssist should propose methods of intersection types
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse, philippe_mulet
Version: 3.1   
Target Milestone: 3.3 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

Description Markus Keller CLA 2005-06-14 06:50:44 EDT
I20050610-1757 (3.1RC2)

ContentAssist should propose methods of intersection types. In the example
below, content assist does not propose compareTo(..) after 'combine(s, i).',
although the compiler accepts it.

public class Try {
    void test(String s, Integer i) {
        combine(s, i).compareTo(null);
    }

    <T> T combine(T t1, T t2) {
        return Math.random() > 0 ? t1 : t2;
    }
}
Comment 1 Olivier Thomann CLA 2006-10-06 15:18:23 EDT
Reproduced in latest.
Comment 2 David Audel CLA 2006-11-13 09:13:26 EST
*** Bug 141281 has been marked as a duplicate of this bug. ***
Comment 3 David Audel CLA 2006-11-13 09:13:50 EST
*** Bug 162772 has been marked as a duplicate of this bug. ***
Comment 4 David Audel CLA 2006-11-15 10:05:21 EST
Created attachment 53912 [details]
Proposed fix
Comment 5 David Audel CLA 2006-11-16 07:23:36 EST
Released for 3.3 M4.

Test added
  CompletionTests_1_5#test0295() -> test0296()
Comment 6 Olivier Thomann CLA 2006-12-11 14:04:07 EST
Verified for 3.3M4 with I20061211-1119