KT-64993 [AA] Add test case for expected type in unsafe call arg

This commit is contained in:
Roman Golyshev
2024-01-15 23:05:06 +01:00
committed by teamcity
parent 72a0f2023d
commit 318fd52567
7 changed files with 39 additions and 0 deletions
@@ -340,6 +340,12 @@ public class Fe10IdeNormalAnalysisSourceModuleExpectedExpressionTypeTestGenerate
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expectedExpressionType/returnFromLambda.kt");
}
@Test
@TestMetadata("safeCallArgument.kt")
public void testSafeCallArgument() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expectedExpressionType/safeCallArgument.kt");
}
@Test
@TestMetadata("sam.kt")
public void testSam() throws Exception {
@@ -340,6 +340,12 @@ public class FirIdeDependentAnalysisSourceModuleExpectedExpressionTypeTestGenera
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expectedExpressionType/returnFromLambda.kt");
}
@Test
@TestMetadata("safeCallArgument.kt")
public void testSafeCallArgument() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expectedExpressionType/safeCallArgument.kt");
}
@Test
@TestMetadata("sam.kt")
public void testSam() throws Exception {
@@ -340,6 +340,12 @@ public class FirIdeNormalAnalysisSourceModuleExpectedExpressionTypeTestGenerated
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expectedExpressionType/returnFromLambda.kt");
}
@Test
@TestMetadata("safeCallArgument.kt")
public void testSafeCallArgument() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expectedExpressionType/safeCallArgument.kt");
}
@Test
@TestMetadata("sam.kt")
public void testSam() throws Exception {
@@ -340,6 +340,12 @@ public class FirStandaloneNormalAnalysisSourceModuleExpectedExpressionTypeTestGe
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expectedExpressionType/returnFromLambda.kt");
}
@Test
@TestMetadata("safeCallArgument.kt")
public void testSafeCallArgument() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expectedExpressionType/safeCallArgument.kt");
}
@Test
@TestMetadata("sam.kt")
public void testSam() throws Exception {
@@ -0,0 +1,5 @@
expression: arg
expected type: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/String
@@ -0,0 +1,8 @@
class Foo {
fun bar(y: String) {}
}
fun x(foo: Foo?) {
foo?.bar(<caret>arg)
}
@@ -0,0 +1,2 @@
expression: arg
expected type: null