mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-11 11:36:59 +07:00
IDEA-189883, IDEA-188976: according to the 15.13.1 search for member is performed in the parameterization (non-raw) type which is a subtype of the first parameter type, in this case no additional variables are required as the type contains type arguments
28 lines
441 B
Java
28 lines
441 B
Java
import java.util.stream.Stream;
|
|
import java.util.Optional;
|
|
|
|
class SomeClass<T> {
|
|
|
|
private T id;
|
|
|
|
public T getId() {
|
|
return id;
|
|
}
|
|
|
|
public void n(final Optional<SomeClass<T>> o) {
|
|
T otherId = o.map(SomeClass::getId).orElse(null);
|
|
}
|
|
|
|
}
|
|
|
|
class A {
|
|
interface Base<T> {
|
|
T foo();
|
|
}
|
|
|
|
interface Sub<S> extends Base<S> { }
|
|
|
|
void m(Stream<Sub> stream) {
|
|
stream.map( Sub::foo);
|
|
}
|
|
} |