Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] [1.5] Tuned support for generic methods



Cheetah is now able to digest code like:

public class X {

    public static void main(String[] args) {
        String s = bar();
    }
    public static <T> T bar() {
            return null;
    }
}
class AX<E> {
}

If you pay attention, you'll observe that for invocation of #bar(), the
inferred type for 'T' needs to be deducted from invocation context where
the return value is assigned to a variable of type 'String'.



Back to the top