Summary: | Generic methods accepting different types! | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Prashant Deva <prashant.deva> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | CLOSED INVALID | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | ||
Version: | 3.1 | ||
Target Milestone: | 3.1 M7 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Prashant Deva
2005-05-15 00:00:30 EDT
In first case, T got inferred to be of type A; in second case it got inferred to be of type Object. Note that when hoverring on message sends, the help bubble shows you what got inferred. Working as expected; javac agrees with us. Added GenericTypeTest#test669 Uhmmm.... I don't really get it, in the method call- indexOf(ac.getAs(),ai); Type of First Param = A[] Type of second Param = AInfo but our generic method should allow methods of only 1 type, either A or AInfo, then how is the above method call allowed?? Oops, sorry i get it now. My understanding of generics was screwed up ;) |