mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
overload resolution: reject more specific inference contradicting site substitution
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
class Test {
|
||||
interface One<T> {
|
||||
<S extends T> S save(S entity);
|
||||
<S extends T> Iterable<S> save(Iterable<S> entities);
|
||||
}
|
||||
static One<String> foo;
|
||||
public static void main(String[] args) throws Exception {
|
||||
foo.save <error descr="Ambiguous method call: both 'One.save(String)' and 'One.save(Iterable<String>)' match">(null)</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user