[Analysis API] add diagnostic test for delegate from library

^KT-62896
This commit is contained in:
Dmitrii Gridin
2023-12-27 17:31:38 +01:00
committed by Space Team
parent ee3119e9d2
commit 3f337bf62d
6 changed files with 38 additions and 0 deletions
@@ -58,6 +58,12 @@ public class Fe10IdeNormalAnalysisSourceModuleCollectDiagnosticsTestGenerated ex
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/declarationErrors.kt");
}
@Test
@TestMetadata("delegationToLibraryInterface.kt")
public void testDelegationToLibraryInterface() throws Exception {
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/delegationToLibraryInterface.kt");
}
@Test
@TestMetadata("duplicatedCallableWithImplicitType.kt")
public void testDuplicatedCallableWithImplicitType() throws Exception {
@@ -58,6 +58,12 @@ public class FirIdeNormalAnalysisSourceModuleCollectDiagnosticsTestGenerated ext
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/declarationErrors.kt");
}
@Test
@TestMetadata("delegationToLibraryInterface.kt")
public void testDelegationToLibraryInterface() throws Exception {
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/delegationToLibraryInterface.kt");
}
@Test
@TestMetadata("duplicatedCallableWithImplicitType.kt")
public void testDuplicatedCallableWithImplicitType() throws Exception {
@@ -58,6 +58,12 @@ public class FirStandaloneNormalAnalysisSourceModuleCollectDiagnosticsTestGenera
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/declarationErrors.kt");
}
@Test
@TestMetadata("delegationToLibraryInterface.kt")
public void testDelegationToLibraryInterface() throws Exception {
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/delegationToLibraryInterface.kt");
}
@Test
@TestMetadata("duplicatedCallableWithImplicitType.kt")
public void testDuplicatedCallableWithImplicitType() throws Exception {
@@ -0,0 +1,15 @@
// IGNORE_FE10
// KT-64503
// MODULE: lib
// MODULE_KIND: LibraryBinary
// FILE: Lib.kt
interface KotlinForDelegationInterface {
fun justFun()
}
open class KotlinAbsImplKtInterface(val delegate: KotlinForDelegationInterface) : KotlinForDelegationInterface by delegate
// MODULE: main(lib)
// FILE: usage.kt
class UseLibDelegate(private val b: KotlinForDelegationInterface) : KotlinAbsImplKtInterface(b)
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtClass at (13,1) - (15,96)
ABSTRACT_MEMBER_NOT_IMPLEMENTED text ranges: [(51,71)]
PSI: KtClass at (13,1) - (15,96)