IDEA Generics fail with <T extends Number & Comparable<T>>

Thank you for IDEA 10.5.  However, I notice there is a bug.  The code below shows a red squiggle in the main() method.

public class IDEAGenericsFail {

    public static void main(String[] args) {
        IDEAGenericsFail fail = new IDEAGenericsFail();

        Dummy<?> d = new Dummy<Integer>();


    public <T extends Number & Comparable<T>> Dummy<T> myMethod(Dummy<T> dummy) {
        return null;

    public static class Dummy<T extends Number & Comparable<T>> {


I did that a long time ago!

Please find it in your heart to prioritise fixing it - it makes me sad whenever I see these non-errors in our codebase.


Please sign in to leave a comment.