No parameter name&type completion for anonymous function
This commit is contained in:
+1
@@ -158,6 +158,7 @@ class BasicCompletionSession(configuration: CompletionSessionConfiguration,
|
|||||||
val owner = list.parent
|
val owner = list.parent
|
||||||
return when (owner) {
|
return when (owner) {
|
||||||
is JetCatchClause, is JetPropertyAccessor, is JetFunctionLiteral -> false
|
is JetCatchClause, is JetPropertyAccessor, is JetFunctionLiteral -> false
|
||||||
|
is JetNamedFunction -> owner.nameIdentifier != null
|
||||||
is JetPrimaryConstructor -> !owner.getContainingClassOrObject().isAnnotation()
|
is JetPrimaryConstructor -> !owner.getContainingClassOrObject().isAnnotation()
|
||||||
else -> true
|
else -> true
|
||||||
}
|
}
|
||||||
|
|||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
package pack
|
||||||
|
|
||||||
|
class Boo
|
||||||
|
|
||||||
|
fun f() {
|
||||||
|
x(fun (b<caret>))
|
||||||
|
}
|
||||||
|
|
||||||
|
// ABSENT: boo
|
||||||
+6
@@ -1629,6 +1629,12 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("NotForAnonymousFunction.kt")
|
||||||
|
public void testNotForAnonymousFunction() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForAnonymousFunction.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("NotForCatchParameter.kt")
|
@TestMetadata("NotForCatchParameter.kt")
|
||||||
public void testNotForCatchParameter() throws Exception {
|
public void testNotForCatchParameter() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForCatchParameter.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForCatchParameter.kt");
|
||||||
|
|||||||
+6
@@ -1629,6 +1629,12 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("NotForAnonymousFunction.kt")
|
||||||
|
public void testNotForAnonymousFunction() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForAnonymousFunction.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("NotForCatchParameter.kt")
|
@TestMetadata("NotForCatchParameter.kt")
|
||||||
public void testNotForCatchParameter() throws Exception {
|
public void testNotForCatchParameter() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForCatchParameter.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForCatchParameter.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user