mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
lambda: create method from usage with lambda arg (IDEA-90957)
This commit is contained in:
+1
-1
@@ -254,7 +254,7 @@ public class CreateFromUsageUtils {
|
||||
names = new String[]{"p" + i};
|
||||
}
|
||||
|
||||
if (argType == null || PsiType.NULL.equals(argType)) {
|
||||
if (argType == null || PsiType.NULL.equals(argType) || argType instanceof PsiLambdaExpressionType) {
|
||||
argType = PsiType.getJavaLangObject(psiManager, resolveScope);
|
||||
}
|
||||
PsiParameter parameter;
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Create Method 'f'" "true"
|
||||
class A {
|
||||
{
|
||||
f(() -> {});
|
||||
}
|
||||
|
||||
private void f(Object p0) {
|
||||
<caret><selection>//To change body of created methods use File | Settings | File Templates.</selection>
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create Method 'f'" "true"
|
||||
class A {
|
||||
{
|
||||
f<caret>(() -> {});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user