mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 08:51:02 +07:00
lambda: get info for return types from type arguments
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import java.util.*;
|
||||
public class BugReportLambdaSquiggles<T> {
|
||||
|
||||
private T t;
|
||||
public <V> List<V> flatMap(Mapper<T, List<V>> mapper) {
|
||||
return mapper.map(t);
|
||||
}
|
||||
|
||||
static void bar( BugReportLambdaSquiggles<Integer> x) {
|
||||
x.flatMap(t1 -> new ArrayList<String>(t1));
|
||||
}
|
||||
|
||||
interface Mapper<T, U> {
|
||||
U map(T t);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user