mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 18:50:54 +07:00
test to choose overloaded method to detect target type
This commit is contained in:
@@ -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;}
|
||||
}
|
||||
Reference in New Issue
Block a user