IDE/FIR IDE: fix not showed following type parameters in completion
This commit is contained in:
committed by
TeamCityServer
parent
0f13359229
commit
ff369b1917
@@ -0,0 +1,5 @@
|
||||
// FIR_COMPARISON
|
||||
|
||||
fun <T: <caret>, S>.foo() {}
|
||||
|
||||
// EXIST: S
|
||||
+5
@@ -651,6 +651,11 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes
|
||||
runTest("idea/idea-completion/testData/basic/common/RecieverMembersFromExtFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SecondTypeArg.kt")
|
||||
public void testSecondTypeArg() throws Exception {
|
||||
runTest("idea/idea-completion/testData/basic/common/SecondTypeArg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SetPrefixForProperties.kt")
|
||||
public void testSetPrefixForProperties() throws Exception {
|
||||
runTest("idea/idea-completion/testData/basic/common/SetPrefixForProperties.kt");
|
||||
|
||||
+5
@@ -651,6 +651,11 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT
|
||||
runTest("idea/idea-completion/testData/basic/common/RecieverMembersFromExtFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SecondTypeArg.kt")
|
||||
public void testSecondTypeArg() throws Exception {
|
||||
runTest("idea/idea-completion/testData/basic/common/SecondTypeArg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SetPrefixForProperties.kt")
|
||||
public void testSetPrefixForProperties() throws Exception {
|
||||
runTest("idea/idea-completion/testData/basic/common/SetPrefixForProperties.kt");
|
||||
|
||||
+5
@@ -651,6 +651,11 @@ public class HighLevelJvmBasicCompletionTestGenerated extends AbstractHighLevelJ
|
||||
runTest("idea/idea-completion/testData/basic/common/RecieverMembersFromExtFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SecondTypeArg.kt")
|
||||
public void testSecondTypeArg() throws Exception {
|
||||
runTest("idea/idea-completion/testData/basic/common/SecondTypeArg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SetPrefixForProperties.kt")
|
||||
public void testSetPrefixForProperties() throws Exception {
|
||||
runTest("idea/idea-completion/testData/basic/common/SetPrefixForProperties.kt");
|
||||
|
||||
+9
@@ -43,10 +43,19 @@ abstract class CompletionDummyIdentifierProviderService {
|
||||
?: specialExtensionReceiverDummyIdentifier(tokenBefore)
|
||||
?: specialInTypeArgsDummyIdentifier(tokenBefore)
|
||||
?: specialInArgumentListDummyIdentifier(tokenBefore)
|
||||
?: isInTypeParametersList(tokenBefore)
|
||||
?: DEFAULT_DUMMY_IDENTIFIER
|
||||
}
|
||||
}
|
||||
|
||||
private fun isInTypeParametersList(tokenBefore: PsiElement?): String? {
|
||||
if (tokenBefore == null) return null
|
||||
if (tokenBefore.parents.any { it is KtTypeParameterList }) {
|
||||
return CompletionUtilCore.DUMMY_IDENTIFIER_TRIMMED
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
private fun specialLambdaSignatureDummyIdentifier(tokenBefore: PsiElement?): String? {
|
||||
var leaf = tokenBefore
|
||||
while (leaf is PsiWhiteSpace || leaf is PsiComment) {
|
||||
|
||||
Reference in New Issue
Block a user