< prev index next >

langtools/test/tools/javac/generics/odersky/BadTest4.java

Print this page

        

*** 28,38 **** static <A> List<A> cons(A x, List<A> xs) { return xs.prepend(x); } static <A> Cell<A> makeCell(A x) { return new Cell<A>(x); } static <A> A id(A x) { return x; } ! static Integer i = new Integer(1); static Number n = i; public static void main(String[] args) { Number x = f(n, i); x = f(i, n); --- 28,38 ---- static <A> List<A> cons(A x, List<A> xs) { return xs.prepend(x); } static <A> Cell<A> makeCell(A x) { return new Cell<A>(x); } static <A> A id(A x) { return x; } ! static Integer i = Integer.valueOf(1); static Number n = i; public static void main(String[] args) { Number x = f(n, i); x = f(i, n);
< prev index next >