Better tests

This commit is contained in:
Valentin Kipyatkov
2015-03-30 13:59:07 +03:00
parent c66b20b204
commit 11b4e66fd0
10 changed files with 77 additions and 108 deletions
@@ -0,0 +1,23 @@
import java.util.ArrayList;
import java.util.Collection;
class C<T> {
void foo1(Collection<? extends T> src) {
T t = src.iterator().next();
}
void foo2(ArrayList<? extends T> src) {
T t = src.iterator().next();
}
void foo3(Collection<? super T> dst, T t) {
dst.add(t)
}
int foo4(Comparable<? super T> comparable, T t) {
return comparable.compareTo(t);
}
void foo5(Collection<?> w) {
}
}