mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 01:09:46 +07:00
new overload resolution: first check that collected methods are potentially compatible with args; for generic methods without specified type arguments this already means that they are applicable; for non generic methods (or raw method calls) expressions should be compatible with parameter types (formal parameter types = actual types as substitutor is known) (IDEA-147798)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import java.util.Optional;
|
||||
|
||||
class Resource<<warning descr="Type parameter 'K' is never used">K</warning>> {
|
||||
private static <T> Resource<T> <warning descr="Private method 'of(T)' is never used">of</warning>(T <warning descr="Parameter 'data' is never used">data</warning>) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private static <T> Resource<T> of(Optional<T> <warning descr="Parameter 'i' is never used">i</warning>) {
|
||||
return null;
|
||||
}
|
||||
|
||||
static {
|
||||
final Optional<String> empty = Optional.empty();
|
||||
Resource.of(empty.flatMap(s -> empty));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user