KT-64993 [AA] Add test case for expected type in unsafe call arg
This commit is contained in:
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
expression: arg
|
||||
expected type: KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/String
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class Foo {
|
||||
fun bar(y: String) {}
|
||||
}
|
||||
|
||||
fun x(foo: Foo?) {
|
||||
foo?.bar(<caret>arg)
|
||||
}
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: arg
|
||||
expected type: null
|
||||
Reference in New Issue
Block a user