mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
testdata for IDEA-175280
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import java.util.*;
|
||||
import java.util.function.*;
|
||||
|
||||
class MethodReferenceWithArguments {
|
||||
|
||||
static <T, U> T createWith(Function<? super U, ? extends T> methodRef, U arg) {
|
||||
return methodRef.apply(arg);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Map<String, String> map = createWith(
|
||||
TreeMap::new,
|
||||
Comparator.<String>reverseOrder());
|
||||
|
||||
map.put("aaa", "ONE");
|
||||
map.put("zzz", "TWO");
|
||||
|
||||
System.out.println(map);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user