[AA] keep nullability for the recreated type
...when computing receiver type for double colon expression ^KT-65930 fixed
This commit is contained in:
+6
@@ -94,6 +94,12 @@ public class Fe10IdeNormalAnalysisSourceModuleDoubleColonReceiverTypeTestGenerat
|
|||||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/methodReference_variable.kt");
|
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/methodReference_variable.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("nullableType.kt")
|
||||||
|
public void testNullableType() {
|
||||||
|
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/nullableType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("outerThisReceiver.kt")
|
@TestMetadata("outerThisReceiver.kt")
|
||||||
public void testOuterThisReceiver() {
|
public void testOuterThisReceiver() {
|
||||||
|
|||||||
+1
-1
@@ -201,7 +201,7 @@ internal class KtFirTypeProvider(
|
|||||||
is FirResolvedQualifier -> {
|
is FirResolvedQualifier -> {
|
||||||
explicitReceiver.symbol?.toLookupTag()?.constructType(
|
explicitReceiver.symbol?.toLookupTag()?.constructType(
|
||||||
explicitReceiver.typeArguments.map { it.toConeTypeProjection() }.toTypedArray(),
|
explicitReceiver.typeArguments.map { it.toConeTypeProjection() }.toTypedArray(),
|
||||||
isNullable = false
|
isNullable = explicitReceiver.isNullableLHSForCallableReference
|
||||||
)?.asKtType()
|
)?.asKtType()
|
||||||
?: fir.resolvedType.getReceiverOfReflectionType()?.asKtType()
|
?: fir.resolvedType.getReceiverOfReflectionType()?.asKtType()
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -94,6 +94,12 @@ public class FirIdeDependentAnalysisSourceModuleDoubleColonReceiverTypeTestGener
|
|||||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/methodReference_variable.kt");
|
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/methodReference_variable.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("nullableType.kt")
|
||||||
|
public void testNullableType() {
|
||||||
|
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/nullableType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("outerThisReceiver.kt")
|
@TestMetadata("outerThisReceiver.kt")
|
||||||
public void testOuterThisReceiver() {
|
public void testOuterThisReceiver() {
|
||||||
|
|||||||
+6
@@ -94,6 +94,12 @@ public class FirIdeNormalAnalysisSourceModuleDoubleColonReceiverTypeTestGenerate
|
|||||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/methodReference_variable.kt");
|
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/methodReference_variable.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("nullableType.kt")
|
||||||
|
public void testNullableType() {
|
||||||
|
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/nullableType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("outerThisReceiver.kt")
|
@TestMetadata("outerThisReceiver.kt")
|
||||||
public void testOuterThisReceiver() {
|
public void testOuterThisReceiver() {
|
||||||
|
|||||||
+6
@@ -94,6 +94,12 @@ public class FirStandaloneNormalAnalysisSourceModuleDoubleColonReceiverTypeTestG
|
|||||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/methodReference_variable.kt");
|
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/methodReference_variable.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("nullableType.kt")
|
||||||
|
public void testNullableType() {
|
||||||
|
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/nullableType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("outerThisReceiver.kt")
|
@TestMetadata("outerThisReceiver.kt")
|
||||||
public void testOuterThisReceiver() {
|
public void testOuterThisReceiver() {
|
||||||
|
|||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
fun Int?.foo() = this?.hashCode() ?: 0
|
||||||
|
|
||||||
|
val x = Int?:<caret>:foo
|
||||||
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
expression: Int?::foo
|
||||||
|
receiver:: type: kotlin.Int?
|
||||||
Reference in New Issue
Block a user