Bug 99928 - ContentAssist should propose methods of intersection types
Summary: ContentAssist should propose methods of intersection types
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M4   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 141281 162772 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-14 06:50 EDT by Markus Keller CLA
Modified: 2006-12-11 14:04 EST (History)
2 users (show)

See Also:


Attachments
Proposed fix (6.91 KB, patch)
2006-11-15 10:05 EST, David Audel 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 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