test to choose overloaded method to detect target type

This commit is contained in:
Anna Kozlova
2014-01-31 13:17:08 +04:00
parent 09437d8d48
commit 2070864b80
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import java.util.List;
import java.util.Set;
public class Sample {
interface L<T> {
List<T> foo();
}
interface S<T> {
Set<T> foo();
}
{
bar(collect(foo())) ;
}
void bar(List<String> l){}
<T> Set<T> collect(L<T> l, int i){return null;}
<T1> List<T1> collect(S<T1> l){return null;}
<K> S<K> foo(){return null;}
}