mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
extend lambda valid context: conditional expressions (IDEA-91140)
This commit is contained in:
@@ -85,7 +85,8 @@ public class LambdaUtil {
|
||||
context instanceof PsiReturnStatement ||
|
||||
context instanceof PsiExpressionList ||
|
||||
context instanceof PsiParenthesizedExpression ||
|
||||
context instanceof PsiArrayInitializerExpression;
|
||||
context instanceof PsiArrayInitializerExpression ||
|
||||
context instanceof PsiConditionalExpression;
|
||||
}
|
||||
|
||||
public static boolean isLambdaFullyInferred(PsiLambdaExpression expression, PsiType functionalInterfaceType) {
|
||||
|
||||
+9
@@ -15,4 +15,13 @@ class Test {
|
||||
I o = (I)(int x)-> { };
|
||||
return (int x) -> {};
|
||||
}
|
||||
}
|
||||
|
||||
interface II {
|
||||
boolean _(String s);
|
||||
}
|
||||
class Test1 {
|
||||
void bar(boolean b){
|
||||
II ik = b ? (s)-> true : (s)->false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user