[AA] don't treat incomplete function as anonymous

^KTIJ-23672
sync anonymous function predicate with RawFirBuilder/DeclarationsConverter
This commit is contained in:
Anna Kozlova
2022-11-23 15:19:44 +01:00
committed by Space Team
parent 7dd907342e
commit abb45a0728
9 changed files with 32 additions and 2 deletions
@@ -58,6 +58,12 @@ public class Fe10IdeNormalAnalysisSourceModuleDeclarationReturnTypeTestGenerated
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/declarationReturnType/delegateProperties.kt");
}
@Test
@TestMetadata("functionWithoutParameterList.kt")
public void testFunctionWithoutParameterList() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/declarationReturnType/functionWithoutParameterList.kt");
}
@Test
@TestMetadata("funtionType.kt")
public void testFuntionType() throws Exception {
@@ -119,7 +119,7 @@ internal class KtFirExpressionTypeProvider(
contract {
returns(true) implies (ktDeclaration is KtNamedFunction)
}
return ktDeclaration is KtFunction && ktDeclaration.name == null
return ktDeclaration is KtNamedFunction && ktDeclaration.isAnonymous
}
private fun KtFunction.toFirAnonymousFunction(): FirAnonymousFunction {
@@ -58,6 +58,12 @@ public class FirIdeDependentAnalysisSourceModuleDeclarationReturnTypeTestGenerat
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/declarationReturnType/delegateProperties.kt");
}
@Test
@TestMetadata("functionWithoutParameterList.kt")
public void testFunctionWithoutParameterList() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/declarationReturnType/functionWithoutParameterList.kt");
}
@Test
@TestMetadata("funtionType.kt")
public void testFuntionType() throws Exception {
@@ -58,6 +58,12 @@ public class FirIdeNormalAnalysisSourceModuleDeclarationReturnTypeTestGenerated
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/declarationReturnType/delegateProperties.kt");
}
@Test
@TestMetadata("functionWithoutParameterList.kt")
public void testFunctionWithoutParameterList() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/declarationReturnType/functionWithoutParameterList.kt");
}
@Test
@TestMetadata("funtionType.kt")
public void testFuntionType() throws Exception {
@@ -58,6 +58,12 @@ public class FirStandaloneNormalAnalysisSourceModuleDeclarationReturnTypeTestGen
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/declarationReturnType/delegateProperties.kt");
}
@Test
@TestMetadata("functionWithoutParameterList.kt")
public void testFunctionWithoutParameterList() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/declarationReturnType/functionWithoutParameterList.kt");
}
@Test
@TestMetadata("funtionType.kt")
public void testFuntionType() throws Exception {
@@ -0,0 +1 @@
inline fun <reified A, reified B> Pair<*,*>.
@@ -0,0 +1 @@
KtNamedFunction@(1,1) : kotlin.Unit