mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 18:50:54 +07:00
method refs: add constraint P1->ReferenceType for inexact method references despite of spec (IDEA-117311)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class Box<TBox>
|
||||
{
|
||||
|
||||
public TBox getValue()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
void foo(Stream<Box<String>> stream){
|
||||
List<String> l1 = stream.map(Box<String>::getValue).collect(Collectors.toList());
|
||||
List<String> l2 = stream.map(Box::getValue).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user