Summary: | [select] Codeselect should not omit cast | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Philipe Mulet <philippe_mulet> | ||||
Component: | Core | Assignee: | David Audel <david_audel> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | amj87.iitr, Mike_Wilson, srikanth_sankaran | ||||
Version: | 3.5 | ||||||
Target Milestone: | 3.6 M1 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Philipe Mulet
2008-11-13 03:52:04 EST
The problem is that the SelectionEngine currently build an AST without the cast expression import java.util.List; public class X { public X() { } void foo(boolean b, Runnable r) { Zork z; String s = <SelectOnMessageSend:bar(z)>; } <T>T bar(T t) { } } Changing Version tag to something more believable. Actually, my original description was wrong. No inference using type expectation (15.12.2.8) should occur with a cast. So hover should indicate "<Object> Object bar(Object)". Now if the cast is removed, it should surface "<String> String bar(String)" as expected type is considered for inference (15.12.2.8). Created attachment 140105 [details]
Proposed fix
Released for 3.6M1 Tests added GenericsSelectionTest#test0024() ResolveTests_1_5#test0123() Test updated SelectionTest#test19() verified for 3.6M1 using build I20090802-2000 |