mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
lambda: incompatible lambda parameters type check fixed according to wildcards (IDEA-99073)
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
class Test {
|
||||
public interface I<K, V> {
|
||||
public V put(K k);
|
||||
}
|
||||
|
||||
{
|
||||
final I<? super Long, CharSequence> i = (Number n) -> n.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
class Test {
|
||||
{
|
||||
<error descr="Incompatible types. Found: '<lambda expression>', required: 'java.lang.Comparable'">Comparable c = (String o)->{
|
||||
Comparable c = (<error descr="Incompatible parameter types in lambda expression">String o</error>)->{
|
||||
return 0;
|
||||
};</error>
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user