1/2 Covert FirUnsupportedSyntheticCallableReferenceChecker with more tests

Review: https://jetbrains.team/p/kt/reviews/9677

I'm going to fix KT-58061 in the next commit. Firstly, let's cover
FirUnsupportedSyntheticCallableReferenceChecker with more tests that
already pass, but are related to KT-58061 problem.
This commit is contained in:
Nikita Bobko
2023-04-19 12:56:30 +02:00
committed by Space Team
parent 6287968511
commit 11f376ae84
6 changed files with 43 additions and 0 deletions
@@ -4341,6 +4341,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/parameterWithSubstitution.kt");
}
@Test
@TestMetadata("referenceToKotlinPropertyViaIntermediateJavaClass.kt")
public void testReferenceToKotlinPropertyViaIntermediateJavaClass() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/referenceToKotlinPropertyViaIntermediateJavaClass.kt");
}
@Test
@TestMetadata("syntheticProperties.kt")
public void testSyntheticProperties() throws Exception {
@@ -4341,6 +4341,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/parameterWithSubstitution.kt");
}
@Test
@TestMetadata("referenceToKotlinPropertyViaIntermediateJavaClass.kt")
public void testReferenceToKotlinPropertyViaIntermediateJavaClass() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/referenceToKotlinPropertyViaIntermediateJavaClass.kt");
}
@Test
@TestMetadata("syntheticProperties.kt")
public void testSyntheticProperties() throws Exception {
@@ -4341,6 +4341,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/parameterWithSubstitution.kt");
}
@Test
@TestMetadata("referenceToKotlinPropertyViaIntermediateJavaClass.kt")
public void testReferenceToKotlinPropertyViaIntermediateJavaClass() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/referenceToKotlinPropertyViaIntermediateJavaClass.kt");
}
@Test
@TestMetadata("syntheticProperties.kt")
public void testSyntheticProperties() throws Exception {
@@ -4347,6 +4347,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/parameterWithSubstitution.kt");
}
@Test
@TestMetadata("referenceToKotlinPropertyViaIntermediateJavaClass.kt")
public void testReferenceToKotlinPropertyViaIntermediateJavaClass() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/referenceToKotlinPropertyViaIntermediateJavaClass.kt");
}
@Test
@TestMetadata("syntheticProperties.kt")
public void testSyntheticProperties() throws Exception {
@@ -0,0 +1,13 @@
// !LANGUAGE: -ReferencesToSyntheticJavaProperties
// FIR_IDENTICAL
// FILE: Foo.java
public class Foo extends Base {
}
// FILE: Main.kt
open class Base {
open val foo: Int = 904
}
val prop = Foo::foo
@@ -4347,6 +4347,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/parameterWithSubstitution.kt");
}
@Test
@TestMetadata("referenceToKotlinPropertyViaIntermediateJavaClass.kt")
public void testReferenceToKotlinPropertyViaIntermediateJavaClass() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/referenceToKotlinPropertyViaIntermediateJavaClass.kt");
}
@Test
@TestMetadata("syntheticProperties.kt")
public void testSyntheticProperties() throws Exception {