[FIR] Explicitly resolve synthetic property return type if necessary

During implicit body resolve phase, we can encounter a reference to a
not yet resolved Kotlin class that inherits a synthetic property from a
Java class. In that case, resolve the return type in
FirSyntheticPropertiesScope.

#KT-57166 Fixed
This commit is contained in:
Kirill Rakhman
2023-03-08 14:08:01 +01:00
committed by Space Team
parent 6aef11704b
commit 9b89759755
12 changed files with 218 additions and 12 deletions
@@ -19570,6 +19570,24 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/j+k/supertypeUsesNested.kt");
}
@Test
@TestMetadata("syntheticAssignmentInLambdaExpressionBody.kt")
public void testSyntheticAssignmentInLambdaExpressionBody() throws Exception {
runTest("compiler/testData/diagnostics/tests/j+k/syntheticAssignmentInLambdaExpressionBody.kt");
}
@Test
@TestMetadata("syntheticPropertyOverridden.kt")
public void testSyntheticPropertyOverridden() throws Exception {
runTest("compiler/testData/diagnostics/tests/j+k/syntheticPropertyOverridden.kt");
}
@Test
@TestMetadata("syntheticPropertyOverridden2.kt")
public void testSyntheticPropertyOverridden2() throws Exception {
runTest("compiler/testData/diagnostics/tests/j+k/syntheticPropertyOverridden2.kt");
}
@Test
@TestMetadata("traitDefaultCall.kt")
public void testTraitDefaultCall() throws Exception {