lambda: incompatible lambda parameters type check fixed according to wildcards (IDEA-99073)

This commit is contained in:
anna
2013-01-16 15:57:08 +01:00
parent 92592d68f4
commit 4cbc38008a
4 changed files with 17 additions and 3 deletions
@@ -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>
};
}
}