Summary: | [1.5][compiler] Generic method overloading. Javac allows but eclipse doesn't | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Mohan Radhakrishnan <javatech> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P3 | CC: | kent_johnson |
Version: | 3.1 | ||
Target Milestone: | 3.1 M7 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Mohan Radhakrishnan
2005-04-06 06:07:20 EDT
Added MethodVerifyTest#test050. Changed SourceTypeBinding#methods() to better detect collisions (check on return type only occurs when compliance 1.5 is enabled), the logic was wrong. Still the method lookup then gets confused, since it picks the wrong message invocation. 1. ERROR in X.java (at line 14) Overloading.<String>foo(); ^^^ Bound mismatch: The generic method foo() of type X is not applicable for the arguments () since the type String is not a valid substitute for the bounded parameter <N extends Number> Tuned findExactMatch to only answer valid method binding when dealing with generic methods since better matches can exist and could be found by non exact match. Fixed Kent - pls verify changes *** Bug 90429 has been marked as a duplicate of this bug. *** Verified in I20050510-0010 |