mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:39:36 +07:00
java 8: intersection type casts (IDEA-98843)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
public static <K extends Comparable<? super K>, V> Comparator<Map.Entry<K, V>> foo() {
|
||||
return (Comparator<Map.Entry<K, V>> & Serializable)(c1, c2) -> c1.getKey().compareTo(c2.getKey());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user