mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
new inference: do not resolve method calls in lambda return expressions to check isPolyExpression when arguments do not contain potential constrains
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
|
||||
interface A<T> {
|
||||
T m(T t);
|
||||
}
|
||||
|
||||
interface B<K> {
|
||||
List<K> l(K k);
|
||||
}
|
||||
|
||||
<F> F foo(A<F> a) {return null;}
|
||||
<Bar> Bar bar(B<Bar> b) { return null;}
|
||||
|
||||
{
|
||||
Integer i = foo(a -> bar(b -> asList(1, b)));
|
||||
Integer i1 = foo(a -> bar(b -> asList(1, 1)));
|
||||
}
|
||||
|
||||
<L> List<L> asList(L l, L l1) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user