[AA] take resolved type of FirThisReceiverExpression
...when computing receiver type for double colon expression ^KT-65914 fixed
This commit is contained in:
+12
@@ -93,4 +93,16 @@ public class Fe10IdeNormalAnalysisSourceModuleDoubleColonReceiverTypeTestGenerat
|
||||
public void testMethodReference_variable() {
|
||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/methodReference_variable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("outerThisReceiver.kt")
|
||||
public void testOuterThisReceiver() {
|
||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/outerThisReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("thisReceiver.kt")
|
||||
public void testThisReceiver() {
|
||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/thisReceiver.kt");
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -192,6 +192,9 @@ internal class KtFirTypeProvider(
|
||||
}
|
||||
is FirCallableReferenceAccess -> {
|
||||
when (val explicitReceiver = fir.explicitReceiver) {
|
||||
is FirThisReceiverExpression -> {
|
||||
explicitReceiver.resolvedType.asKtType()
|
||||
}
|
||||
is FirPropertyAccessExpression -> {
|
||||
explicitReceiver.resolvedType.asKtType()
|
||||
}
|
||||
|
||||
+12
@@ -93,4 +93,16 @@ public class FirIdeDependentAnalysisSourceModuleDoubleColonReceiverTypeTestGener
|
||||
public void testMethodReference_variable() {
|
||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/methodReference_variable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("outerThisReceiver.kt")
|
||||
public void testOuterThisReceiver() {
|
||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/outerThisReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("thisReceiver.kt")
|
||||
public void testThisReceiver() {
|
||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/thisReceiver.kt");
|
||||
}
|
||||
}
|
||||
|
||||
+12
@@ -93,4 +93,16 @@ public class FirIdeNormalAnalysisSourceModuleDoubleColonReceiverTypeTestGenerate
|
||||
public void testMethodReference_variable() {
|
||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/methodReference_variable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("outerThisReceiver.kt")
|
||||
public void testOuterThisReceiver() {
|
||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/outerThisReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("thisReceiver.kt")
|
||||
public void testThisReceiver() {
|
||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/thisReceiver.kt");
|
||||
}
|
||||
}
|
||||
|
||||
+12
@@ -93,4 +93,16 @@ public class FirStandaloneNormalAnalysisSourceModuleDoubleColonReceiverTypeTestG
|
||||
public void testMethodReference_variable() {
|
||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/methodReference_variable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("outerThisReceiver.kt")
|
||||
public void testOuterThisReceiver() {
|
||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/outerThisReceiver.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("thisReceiver.kt")
|
||||
public void testThisReceiver() {
|
||||
runTest("analysis/analysis-api/testData/components/typeInfoProvider/doubleColonReceiverType/thisReceiver.kt");
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class Test {
|
||||
fun bar(): Int = 42
|
||||
inner class Foo {
|
||||
fun m() {
|
||||
val f = this@Test:<caret>:bar
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: this@Test::bar
|
||||
receiver:: type: Test
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
class Test {
|
||||
fun bar(): Int = 42
|
||||
fun m() {
|
||||
val f = this:<caret>:bar
|
||||
}
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
expression: this::bar
|
||||
receiver:: type: Test
|
||||
Reference in New Issue
Block a user