Generic method lookup with raw typed parameters error
Issue #169
resolved
The following piece of code does not compile :
package p;
import java.util.Vector;
import java.util.Collections;
class C {
void m(){
Vector v = new Vector();
Collections.sort(v);
}
}
Comments (4)
-
-
I found a solution for this particular error, but it is not very elegant and it seems like the type argument bounds checking code should be refactored to make it simpler. There is still potentially more errors in this code that needs to be fixed.
I am not interested in refactoring the type bound checking code right now, so I think I will push the current fix anyway and hopefully look at simplifying the code in the future.
-
reporter I'll be happy with any fix you can provide. I'm sorry the recent GenericType refactoring brought this new bugs.
-
- changed status to resolved
- Log in to comment
I made a test case independent of the Java library:
This test case is very similar to a test for the issue
#168, except that? super T
is used in the type variable bound. It seems like the fix should be very similar to the fix for issue#168.