Main.java:12: error: method foo in class Main cannot be applied to given types;
foo(true ? (A)null : (B)null);
^
required: Integer
found: Comparable<CAP#1>
reason: actual argument Comparable<CAP#1> cannot be converted to Integer by method invocation conversion
where CAP#1 is a fresh type-variable:
CAP#1 extends Comparable<?> from capture of ? extends Comparable<?>
1 error