[FIR] Source for property delegates should not be null

^KT-60327 fixed


Merge-request: KT-MR-13221
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
This commit is contained in:
Egor Kulikov
2023-11-29 08:27:53 +00:00
committed by Space Team
parent 5cf33c3556
commit 001e9a4489
15 changed files with 75 additions and 0 deletions
@@ -52,6 +52,12 @@ public class Fe10IdeNormalAnalysisSourceModuleCollectDiagnosticsTestGenerated ex
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/declarationErrors.kt");
}
@Test
@TestMetadata("incompleteDelegation.kt")
public void testIncompleteDelegation() throws Exception {
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/incompleteDelegation.kt");
}
@Test
@TestMetadata("incompleteFor.kt")
public void testIncompleteFor() throws Exception {
@@ -52,6 +52,12 @@ public class FirIdeNormalAnalysisSourceModuleCollectDiagnosticsTestGenerated ext
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/declarationErrors.kt");
}
@Test
@TestMetadata("incompleteDelegation.kt")
public void testIncompleteDelegation() throws Exception {
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/incompleteDelegation.kt");
}
@Test
@TestMetadata("incompleteFor.kt")
public void testIncompleteFor() throws Exception {
@@ -52,6 +52,12 @@ public class FirStandaloneNormalAnalysisSourceModuleCollectDiagnosticsTestGenera
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/declarationErrors.kt");
}
@Test
@TestMetadata("incompleteDelegation.kt")
public void testIncompleteDelegation() throws Exception {
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/incompleteDelegation.kt");
}
@Test
@TestMetadata("incompleteFor.kt")
public void testIncompleteFor() throws Exception {
@@ -0,0 +1,7 @@
Diagnostics from elements:
for PSI element of type KtParameter at (3,21-28)
UNUSED_PARAMETER text ranges: [(53,54)]
PSI: KtParameter at (3,21-28)
for PSI element of type KtParameter at (3,30-45)
UNUSED_PARAMETER text ranges: [(62,63)]
PSI: KtParameter at (3,30-45)
@@ -0,0 +1,4 @@
import kotlin.reflect.KProperty
fun String.getValue(x: Any?, y: KProperty<*>) = ""
val x: String by <caret>
@@ -0,0 +1 @@
Diagnostics from elements:
@@ -201,6 +201,12 @@ public class FirOutOfContentRootLazyBodiesCalculatorTestGenerated extends Abstra
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt");
}
@Test
@TestMetadata("incompletePropertyWithDelegate.kt")
public void testIncompletePropertyWithDelegate() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/incompletePropertyWithDelegate.kt");
}
@Test
@TestMetadata("initBlockWithDeclarations.kt")
public void testInitBlockWithDeclarations() throws Exception {
@@ -201,6 +201,12 @@ public class FirSourceLazyBodiesCalculatorTestGenerated extends AbstractFirSourc
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt");
}
@Test
@TestMetadata("incompletePropertyWithDelegate.kt")
public void testIncompletePropertyWithDelegate() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/incompletePropertyWithDelegate.kt");
}
@Test
@TestMetadata("initBlockWithDeclarations.kt")
public void testInitBlockWithDeclarations() throws Exception {