[FIR] Reproduce KT-65058

^KT-65058
This commit is contained in:
Nikolay Lunyak
2024-01-25 12:13:54 +02:00
committed by Space Team
parent 695119ca35
commit b6e913cde7
7 changed files with 54 additions and 0 deletions
@@ -165,6 +165,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/Builders.kt");
}
@Test
@TestMetadata("callingProtectedFromInline.kt")
public void testCallingProtectedFromInline() throws Exception {
runTest("compiler/testData/diagnostics/tests/callingProtectedFromInline.kt");
}
@Test
@TestMetadata("capturedTypesSubtyping.kt")
public void testCapturedTypesSubtyping() throws Exception {
@@ -165,6 +165,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/Builders.kt");
}
@Test
@TestMetadata("callingProtectedFromInline.kt")
public void testCallingProtectedFromInline() throws Exception {
runTest("compiler/testData/diagnostics/tests/callingProtectedFromInline.kt");
}
@Test
@TestMetadata("capturedTypesSubtyping.kt")
public void testCapturedTypesSubtyping() throws Exception {
@@ -165,6 +165,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/Builders.kt");
}
@Test
@TestMetadata("callingProtectedFromInline.kt")
public void testCallingProtectedFromInline() throws Exception {
runTest("compiler/testData/diagnostics/tests/callingProtectedFromInline.kt");
}
@Test
@TestMetadata("capturedTypesSubtyping.kt")
public void testCapturedTypesSubtyping() throws Exception {
@@ -165,6 +165,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/Builders.kt");
}
@Test
@TestMetadata("callingProtectedFromInline.kt")
public void testCallingProtectedFromInline() throws Exception {
runTest("compiler/testData/diagnostics/tests/callingProtectedFromInline.kt");
}
@Test
@TestMetadata("capturedTypesSubtyping.kt")
public void testCapturedTypesSubtyping() throws Exception {
@@ -0,0 +1,12 @@
// ISSUE: KT-65058
open class A {
protected fun foo() {
}
}
<!NOTHING_TO_INLINE!>inline<!> fun bar() = object : A() {
fun baz() {
<!PROTECTED_CALL_FROM_PUBLIC_INLINE_ERROR!>foo<!>()
}
}
@@ -0,0 +1,12 @@
// ISSUE: KT-65058
open class A {
protected fun foo() {
}
}
<!NOTHING_TO_INLINE!>inline<!> fun bar() = object : A() {
fun baz() {
foo()
}
}
@@ -165,6 +165,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/Builders.kt");
}
@Test
@TestMetadata("callingProtectedFromInline.kt")
public void testCallingProtectedFromInline() throws Exception {
runTest("compiler/testData/diagnostics/tests/callingProtectedFromInline.kt");
}
@Test
@TestMetadata("capturedTypesSubtyping.kt")
public void testCapturedTypesSubtyping() throws Exception {